Jelajahi Sumber

Auto-convert title & message to string

Sebastián Katzer 11 tahun lalu
induk
melakukan
b36d37c2ef
1 mengubah file dengan 8 tambahan dan 0 penghapusan
  1. 8 0
      www/local-notification.js

+ 8 - 0
www/local-notification.js

@@ -155,6 +155,14 @@ LocalNotification.prototype = {
             options.date = new Date();
         }
 
+        if (options.title) {
+            options.title = options.title.toString();
+        }
+
+        if (options.message) {
+            options.message = options.message.toString();
+        }
+
         if (typeof options.date == 'object') {
             options.date = Math.round(options.date.getTime()/1000);
         }