#71 ios toast get error while message is integer

This commit is contained in:
EddyVerbruggen 2016-03-17 21:30:17 +01:00
parent fe1aed17e3
commit 9ed9f018a7

View File

@ -11,7 +11,7 @@ Toast.prototype.optionsBuilder = function () {
return {
withMessage: function(m) {
message = m;
message = m.toString();
return this;
},
@ -44,6 +44,7 @@ Toast.prototype.optionsBuilder = function () {
Toast.prototype.showWithOptions = function (options, successCallback, errorCallback) {
options.duration = (options.duration === undefined ? 'long' : options.duration.toString());
options.message = options.message.toString();
cordova.exec(successCallback, errorCallback, "Toast", "show", [options]);
};