fix the error of not being able to read the length of numeric (#5577)

This commit is contained in:
Hoang Nguyen 2021-10-14 15:50:29 +07:00 committed by GitHub
parent e73445e5d5
commit 26b5d9423a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -270,7 +270,7 @@ export default {
return array !== null && array !== undefined && Array.isArray(array) && array.length > 0
},
isValidTextValueForKey (obj, key) {
return key in obj && obj[key] != null && obj[key].length > 0
return key in obj && obj[key] != null && String(obj[key]).length > 0
},
fetchZoneData () {
this.zones = []

View File

@ -258,7 +258,7 @@ export default {
return key in obj && obj[key] != null
},
isValidTextValueForKey (obj, key) {
return this.isValidValueForKey(obj, key) && obj[key].length > 0
return this.isValidValueForKey(obj, key) && String(obj[key]).length > 0
},
fetchZoneData () {
this.zones = []

View File

@ -442,7 +442,7 @@ export default {
return this.isValidValueForKey(obj, key) && obj[key] === true
},
isValidTextValueForKey (obj, key) {
return this.isValidValueForKey(obj, key) && obj[key].length > 0
return this.isValidValueForKey(obj, key) && String(obj[key]).length > 0
},
fetchZoneData () {
this.zones = []