Fix Polyfill.notificationPermission on Opera.

Opera doesn't have notifications.
This commit is contained in:
Mayhem 2013-08-17 23:00:06 +02:00
parent 25f77a12da
commit 7c9f43a5f0

View File

@ -6,7 +6,7 @@ Polyfill =
@visibility() @visibility()
<% } %> <% } %>
notificationPermission: -> notificationPermission: ->
return if window.Notification and 'permission' of Notification return if !window.Notification or 'permission' of Notification
Object.defineProperty Notification, 'permission', Object.defineProperty Notification, 'permission',
get: -> get: ->
switch webkitNotifications.checkPermission() switch webkitNotifications.checkPermission()