Browse Source

check if the given value is a string or not

Dustin Utecht 5 years ago
parent
commit
ead6c72762
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/utils/index.js

+ 5 - 2
src/utils/index.js

@@ -76,8 +76,11 @@ export default {
     }
   },
 
-  normalizeAccent (string) {
-    return string.normalize('NFD').replace(/[\u0300-\u036f]/g, '')
+  normalizeAccent (value) {
+    if (typeof value !== 'string') {
+      return value
+    }
+    return value.normalize('NFD').replace(/[\u0300-\u036f]/g, '')
   },
 
   updateFieldGroup (columns) {