Преглед изворни кода

Only exec ready and launch on supported platforms - fixes #1406

Sebastián Katzer пре 8 година
родитељ
комит
fd613254c2
1 измењених фајлова са 6 додато и 2 уклоњено
  1. 6 2
      www/local-notification-util.js

+ 6 - 2
www/local-notification-util.js

@@ -416,12 +416,16 @@ exports.setLaunchDetails = function () {
 
 // Called after 'deviceready' event
 channel.deviceready.subscribe(function () {
-    exports.exec('ready');
+    if (['Android', 'windows', 'iOS'].indexOf(device.platform) > -1) {
+        exports.exec('ready');
+    }
 });
 
 // Called before 'deviceready' event
 channel.onCordovaReady.subscribe(function () {
-    exports.setLaunchDetails();
+    if (['Android', 'windows', 'iOS'].indexOf(device.platform) > -1) {
+        exports.setLaunchDetails();
+    }
 
     channel.onCordovaInfoReady.subscribe(function () {
         exports.applyPlatformSpecificOptions();