ソースを参照

check if the given value is a string or not

Dustin Utecht 5 年 前
コミット
ead6c72762
1 ファイル変更5 行追加2 行削除
  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) {