This commit is contained in:
2021-08-10 18:49:11 +00:00
parent 9e8e4dbecd
commit dc15ccaee5
3 changed files with 37 additions and 25 deletions

View File

@@ -659,22 +659,25 @@ export default {
// is string replacement for lodash
// https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isString
//
isString: function(str) {
//modified from above, due to bug (I think)
//posted case here: https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore/issues/304
if (str == null) {
return false;
}
// isString: function(str) {
// //modified from above, due to bug (I think)
// //posted case here: https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore/issues/304
// if (str == null) {
// return false;
// }
if (str == "") {
return true;
}
let temp = str.valueOf();
if (typeof temp === "string") {
return true;
} else {
return false;
}
// if (str == "") {//another bug, if numeric this is true?! Using recommended method below
// return true;
// }
// let temp = str.valueOf();
// if (typeof temp === "string") {
// return true;
// } else {
// return false;
// }
// },
isString: function(str) {
return str != null && typeof str.valueOf() === "string";
},
///////////////////////////////////////////////
//