mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
enhance(plugin): better log for beforeunload hook on user side
This commit is contained in:
@@ -924,7 +924,7 @@ class PluginLocal extends EventEmitter<
|
||||
)
|
||||
this.emit('beforeunload', eventBeforeUnload)
|
||||
} catch (e) {
|
||||
this.logger.error('[beforeunload Error]', e)
|
||||
this.logger.error('[beforeunload]', e)
|
||||
}
|
||||
|
||||
await this.dispose()
|
||||
|
||||
@@ -513,7 +513,7 @@ export class LSPluginUser
|
||||
cb && (await cb(rest))
|
||||
actor?.resolve(null)
|
||||
} catch (e) {
|
||||
console.debug(`${_caller.debugTag} [beforeunload] `, e)
|
||||
this.logger.error(`[beforeunload] `, e)
|
||||
actor?.reject(e)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user