fix(shared): Don't make assumptions about saveAs
- Fixes #5542 - Fixes #5541
This commit is contained in:
parent
27aae0014f
commit
8535b7bdfd
1 changed files with 5 additions and 3 deletions
|
@ -104,9 +104,11 @@ export const DraftHeader = ({
|
|||
* we figure out what's causing it exactly
|
||||
*/
|
||||
useEffect(() => {
|
||||
if (saveAs.edit === 0) savePattern(true)
|
||||
saveAs.edit++
|
||||
}, [saveAs.edit])
|
||||
if (saveAs && saveAs.edit === 0) {
|
||||
savePattern(true)
|
||||
saveAs.edit++
|
||||
}
|
||||
}, [saveAs])
|
||||
|
||||
const savePattern = async (silent = false) => {
|
||||
if (!silent) setLoadingStatus([true, 'savingPattern'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue