fix: crash when application launched from UNUserNotificationCenter notification (#25702)
This commit is contained in:
parent
5387b5b9b2
commit
17c7c5cfdd
1 changed files with 2 additions and 2 deletions
|
@ -69,9 +69,9 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
|
||||||
|
|
||||||
- (void)applicationDidFinishLaunching:(NSNotification*)notify {
|
- (void)applicationDidFinishLaunching:(NSNotification*)notify {
|
||||||
NSUserNotification* user_notification =
|
NSUserNotification* user_notification =
|
||||||
[notify userInfo][(id) @"NSApplicationLaunchUserNotificationKey"];
|
[notify userInfo][NSApplicationLaunchUserNotificationKey];
|
||||||
|
|
||||||
if (user_notification.userInfo) {
|
if ([user_notification isKindOfClass:[NSUserNotification class]]) {
|
||||||
electron::Browser::Get()->DidFinishLaunching(
|
electron::Browser::Get()->DidFinishLaunching(
|
||||||
electron::NSDictionaryToDictionaryValue(user_notification.userInfo));
|
electron::NSDictionaryToDictionaryValue(user_notification.userInfo));
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue