From 75b990faffdc7338c6571ff286f904f7e7167bdd Mon Sep 17 00:00:00 2001 From: Zhuo Lu Date: Tue, 16 Jan 2018 19:00:39 -0800 Subject: [PATCH] Use std::string::empty to check --- brightray/browser/mac/cocoa_notification.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/brightray/browser/mac/cocoa_notification.mm b/brightray/browser/mac/cocoa_notification.mm index 17f556efb9..73bf44a05b 100644 --- a/brightray/browser/mac/cocoa_notification.mm +++ b/brightray/browser/mac/cocoa_notification.mm @@ -48,10 +48,10 @@ void CocoaNotification::Show(const NotificationOptions& options) { if (options.silent) { [notification_ setSoundName:nil]; - } else if (options.sound != nil) { - [notification_ setSoundName:base::SysUTF16ToNSString(options.sound)]; - } else { + } else if (options.sound.empty()) { [notification_ setSoundName:NSUserNotificationDefaultSoundName]; + } else { + [notification_ setSoundName:base::SysUTF16ToNSString(options.sound)]; } [notification_ setHasActionButton:false];