From 129aa3c3c86f7959d8500a05c7823a87a256aca9 Mon Sep 17 00:00:00 2001 From: devchenyan Date: Wed, 10 Apr 2024 16:20:41 +0800 Subject: [PATCH] fix: Neuron for MacOS crashes on quitting (#3103) * fix: Neuron for MacOS crashes on quitting * fix: spell error --------- Co-authored-by: Chen Yu --- packages/neuron-wallet/src/main.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/neuron-wallet/src/main.ts b/packages/neuron-wallet/src/main.ts index a65b386bea..182eabd076 100644 --- a/packages/neuron-wallet/src/main.ts +++ b/packages/neuron-wallet/src/main.ts @@ -16,9 +16,11 @@ if (singleInstanceLock) { appController.start() }) - app.on('before-quit', async () => { + app.on('before-quit', async e => { logger.info('App:\tNeuron will exit') + e.preventDefault() await appController.end() + app.exit() }) app.on('activate', appController.openWindow)