Przeglądaj źródła

FIX option parsing for timeoutAfter: must use property timeoutAfter instead of property timeout (#1692)

russaa 6 lat temu
rodzic
commit
dc383144df
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4 4
      www/local-notification.js

+ 4 - 4
www/local-notification.js

@@ -618,12 +618,12 @@ exports._convertProperties = function (options) {
         console.warn('Property "smallIcon" must be of kind res://...');
     }
 
-    if (typeof options.timeout === 'boolean') {
-        options.timeout = options.timeout ? 3600000 : null;
+    if (typeof options.timeoutAfter === 'boolean') {
+        options.timeoutAfter = options.timeoutAfter ? 3600000 : null;
     }
 
-    if (options.timeout) {
-        options.timeout = parseToInt('timeout', options);
+    if (options.timeoutAfter) {
+        options.timeoutAfter = parseToInt('timeoutAfter', options);
     }
 
     options.data = JSON.stringify(options.data);