Parcourir la source

Fix "Callbacks returns Object instead of args"

Bug came with 7fc01db0ac392d2c575e26100967637d523055d4.
Solves #168
Sebastián Katzer il y a 11 ans
Parent
commit
91169ad7d4
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      www/local-notification.js

+ 3 - 1
www/local-notification.js

@@ -122,7 +122,9 @@ LocalNotification.prototype = {
      */
     createCallbackFn: function (callbackFn, scope) {
         return function () {
-            callbackFn.apply(arguments, scope || this);
+            if (typeof callbackFn == 'function') {
+                callbackFn.apply(scope || this, arguments);
+            }
         }
     },