Commit c00e6cdf by Sebastián Katzer

Make sure that - if an ID is given - the ID needs to be a string.

The app crashes if a number is passed as an argument.
parent 311c1270
...@@ -40,6 +40,10 @@ LocalNotification.prototype = { ...@@ -40,6 +40,10 @@ LocalNotification.prototype = {
} }
} }
if (defaults.id) {
defaults.id = defaults.id.toString();
}
if (typeof defaults.date == 'object') { if (typeof defaults.date == 'object') {
defaults.date = Math.round(defaults.date.getTime()/1000); defaults.date = Math.round(defaults.date.getTime()/1000);
} }
...@@ -55,7 +59,7 @@ LocalNotification.prototype = { ...@@ -55,7 +59,7 @@ LocalNotification.prototype = {
* @param {String} id * @param {String} id
*/ */
cancel: function (id) { cancel: function (id) {
cordova.exec(null, null, 'LocalNotification', 'cancel', [id]); cordova.exec(null, null, 'LocalNotification', 'cancel', [id.toString()]);
}, },
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment