diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js index 71d8e6cc5..ff4c26caf 100644 --- a/js/ui/notificationDaemon.js +++ b/js/ui/notificationDaemon.js @@ -63,9 +63,9 @@ class FdoNotificationDaemon { _iconForNotificationData(icon) { if (icon) { - if (icon.substr(0, 7) === 'file://') + if (icon.startsWith('file://')) return new Gio.FileIcon({file: Gio.File.new_for_uri(icon)}); - else if (icon[0] === '/') + else if (icon.startsWith('/')) return new Gio.FileIcon({file: Gio.File.new_for_path(icon)}); else return new Gio.ThemedIcon({name: icon});