mirror of
https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin.git
synced 2025-04-25 03:50:12 +08:00
#71 ios toast get error while message is integer
This commit is contained in:
parent
fe1aed17e3
commit
9ed9f018a7
@ -11,7 +11,7 @@ Toast.prototype.optionsBuilder = function () {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
withMessage: function(m) {
|
withMessage: function(m) {
|
||||||
message = m;
|
message = m.toString();
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -44,6 +44,7 @@ Toast.prototype.optionsBuilder = function () {
|
|||||||
|
|
||||||
Toast.prototype.showWithOptions = function (options, successCallback, errorCallback) {
|
Toast.prototype.showWithOptions = function (options, successCallback, errorCallback) {
|
||||||
options.duration = (options.duration === undefined ? 'long' : options.duration.toString());
|
options.duration = (options.duration === undefined ? 'long' : options.duration.toString());
|
||||||
|
options.message = options.message.toString();
|
||||||
cordova.exec(successCallback, errorCallback, "Toast", "show", [options]);
|
cordova.exec(successCallback, errorCallback, "Toast", "show", [options]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user