Skip to content

Commit

Permalink
fix: infinite recreate due to wrong dep of useEffect
Browse files Browse the repository at this point in the history
  • Loading branch information
SunriseFox committed Nov 11, 2019
1 parent 7cd669f commit 457eee9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/extension/options-page/Backup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ export default function BackupDialog() {
setBackupObj(null)
setQRText('')
})
}, [currentIdentifier, identity])
// eslint will insert currentIdentifier to deps, which causes loop
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [identity])

const downloadAsFile = () => {
Services.Welcome.downloadBackup(backupObj)
Expand Down

0 comments on commit 457eee9

Please sign in to comment.