|
@@ -232,8 +232,10 @@ export function findarrays(ar, feature, v) {
|
|
|
var atxt = ar[i][feature];
|
|
|
var btxt = v;
|
|
|
var type = 0;
|
|
|
- if (atxt.match(btxt) == btxt) {
|
|
|
- type = 1;
|
|
|
+ if (atxt) {
|
|
|
+ if (atxt.match(btxt) == btxt) {
|
|
|
+ type = 1;
|
|
|
+ }
|
|
|
}
|
|
|
if (type == 1) {
|
|
|
arr.push(ar[i]);
|
|
@@ -279,7 +281,7 @@ function getRealLength(string) {
|
|
|
charCode = -1
|
|
|
for (let i = 0; i < len; i++) {
|
|
|
charCode = string.charCodeAt(i)
|
|
|
- if (charCode >=0 && charCode <= 128) {
|
|
|
+ if (charCode >= 0 && charCode <= 128) {
|
|
|
realLength += 1
|
|
|
} else {
|
|
|
realLength += 2
|