Browse Source

Fix "Unknown property: autoClear" message

Sebastián Katzer 10 năm trước cách đây
mục cha
commit
ae013ec018
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      www/local-notification-util.js

+ 3 - 1
www/local-notification-util.js

@@ -87,7 +87,9 @@ exports.mergeWithDefaults = function (options) {
     options.text = this.getValueFor(options, 'text', 'message');
     options.data = this.getValueFor(options, 'data', 'json');
 
-    options.autoClear = this.getValueFor(options, 'autoClear', 'autoCancel');
+    if (defaults.hasOwnProperty('autoClear')) {
+        options.autoClear = this.getValueFor(options, 'autoClear', 'autoCancel');
+    }
 
     if (options.autoClear !== true && options.ongoing) {
         options.autoClear = false;