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

Convert at only if provided

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

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

@@ -154,11 +154,13 @@ exports.convertProperties = function (options) {
         }
     }
 
-    if (typeof options.at == 'object') {
-        options.at = options.at.getTime();
-    }
+    if (options.at) {
+        if (typeof options.at == 'object') {
+            options.at = options.at.getTime();
+        }
 
-    options.at = Math.round(options.at/1000);
+        options.at = Math.round(options.at/1000);
+    }
 
     if (typeof options.data == 'object') {
         options.data = JSON.stringify(options.data);