diff --git a/shell/browser/mac/electron_application_delegate.mm b/shell/browser/mac/electron_application_delegate.mm index 4dabcabc0d80e..15e4456680069 100644 --- a/shell/browser/mac/electron_application_delegate.mm +++ b/shell/browser/mac/electron_application_delegate.mm @@ -69,9 +69,9 @@ - (void)applicationWillFinishLaunching:(NSNotification*)notify { - (void)applicationDidFinishLaunching:(NSNotification*)notify { 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::NSDictionaryToDictionaryValue(user_notification.userInfo)); } else {