Skip to content

Commit

Permalink
#71 ios toast get error while message is integer
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyVerbruggen committed Mar 17, 2016
1 parent fe1aed1 commit 9ed9f01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion www/Toast.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Toast.prototype.optionsBuilder = function () {

return {
withMessage: function(m) {
message = m;
message = m.toString();
return this;
},

Expand Down Expand Up @@ -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]);
};

Expand Down

0 comments on commit 9ed9f01

Please sign in to comment.