Skip to content

Commit

Permalink
refactor(browser/growl.js): Flatten isPermitted ask() return value
Browse files Browse the repository at this point in the history
Removed outer Promise by request
  • Loading branch information
plroebuck committed Dec 13, 2018
1 parent f1a8db1 commit 621a604
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/browser/growl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
});
}
};
Expand Down

0 comments on commit 621a604

Please sign in to comment.