Change the API to remove nodejs listeners
This commit is contained in:
@@ -36,9 +36,9 @@ const PasswordPrompt = ({ enableShowApp }) => {
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
nodejs.channel.addListener('check-pw', passHashToDb, this)
|
||||
const listener = nodejs.channel.addListener('check-pw', passHashToDb, this)
|
||||
|
||||
return () => nodejs.channel.remove('check-pw', passHashToDb)
|
||||
return () => listener.remove()
|
||||
}, [])
|
||||
|
||||
const onDeleteDataConfirmation = async () => {
|
||||
|
||||
Reference in New Issue
Block a user