From 487c2375f68f2fefc4e3c2f919ef6348b680d514 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Wed, 12 Jul 2023 10:47:23 +0100 Subject: [PATCH] Update ObjectUtils.js --- components/lib/utils/ObjectUtils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/lib/utils/ObjectUtils.js b/components/lib/utils/ObjectUtils.js index 4655b0a2f..924dee215 100755 --- a/components/lib/utils/ObjectUtils.js +++ b/components/lib/utils/ObjectUtils.js @@ -203,11 +203,11 @@ export default { toFlatCase(str) { // convert snake, kebab, camel and pascal cases to flat case - return this.isNotEmpty(str) ? str.replace(/(-|_)/g, '').toLowerCase() : str; + return this.isNotEmpty(str) && this.isString(str) ? str.replace(/(-|_)/g, '').toLowerCase() : str; }, toCapitalCase(str) { - return this.isNotEmpty(str) ? str[0].toUpperCase() + str.slice(1) : str; + return this.isNotEmpty(str) && this.isString(str) ? str[0].toUpperCase() + str.slice(1) : str; }, isEmpty(value) {