Commit c00e6cdf authored by Sebastián Katzer's avatar Sebastián Katzer
Browse files

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
Loading
Loading
Loading
Loading
+5 −1
Changes for www/local-notification.js: 5 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -40,6 +40,10 @@ LocalNotification.prototype = {
            }
        }

        if (defaults.id) {
            defaults.id = defaults.id.toString();
        }

        if (typeof defaults.date == 'object') {
            defaults.date = Math.round(defaults.date.getTime()/1000);
        }
@@ -55,7 +59,7 @@ LocalNotification.prototype = {
     * @param {String} id
     */
    cancel: function (id) {
        cordova.exec(null, null, 'LocalNotification', 'cancel', [id]);
        cordova.exec(null, null, 'LocalNotification', 'cancel', [id.toString()]);
    },

    /**