From 621a6048c4241c17375a5ee501b5cc073722db80 Mon Sep 17 00:00:00 2001 From: Paul Roebuck Date: Thu, 13 Dec 2018 11:30:58 -0600 Subject: [PATCH] refactor(browser/growl.js): Flatten `isPermitted` ask() return value Removed outer Promise by request --- lib/browser/growl.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/browser/growl.js b/lib/browser/growl.js index 495d4e8d9e..2e8d83cfde 100644 --- a/lib/browser/growl.js +++ b/lib/browser/growl.js @@ -70,10 +70,8 @@ function isPermitted() { return Promise.resolve(false); }, default: function ask() { - return new Promise(function(resolve, reject) { - Notification.requestPermission().then(function(permission) { - return resolve(permission === 'granted'); - }); + return Notification.requestPermission().then(function(permission) { + return permission === 'granted'; }); } };