fixed bugs

This commit is contained in:
huangjx
2022-02-22 18:09:35 +08:00
parent 1123299e5c
commit 1815c4f00c

View File

@@ -187,9 +187,12 @@ const helper = {
helper.message(msg, 20000);
})
},
str2Boolean: function (string) {
str2Boolean: function (str) {
if (typeof str != "string") {
return false;
}
switch (string.toLowerCase().trim()) {
switch (str.toLowerCase().trim()) {
case "true":
case "yes":
case "1":
@@ -201,7 +204,7 @@ const helper = {
case null:
return false;
default:
return Boolean(string);
return Boolean(str);
}
}
}