From 9ed9f018a7dd0c29c4d26e84ccf8f4ce3f9d468a Mon Sep 17 00:00:00 2001 From: EddyVerbruggen Date: Thu, 17 Mar 2016 21:30:17 +0100 Subject: [PATCH] #71 ios toast get error while message is integer --- www/Toast.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/Toast.js b/www/Toast.js index 5481e53..ca95231 100755 --- a/www/Toast.js +++ b/www/Toast.js @@ -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]); };