Merge pull request 'Issue 1' (#2) from issue-1 into master
Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
+4
-1
@@ -243,7 +243,10 @@ export function classifyAircraft(row) {
|
||||
|
||||
const matchesAny = (fields, list) => fields.some(f => {
|
||||
const value = normalizeName(f);
|
||||
return value && list.some(k => value.includes(normalizeName(k)));
|
||||
return value && list.some(k => {
|
||||
const kw = normalizeName(k);
|
||||
return kw && new RegExp('\\b' + kw.replace(/[.*+?^${}()|[\\]\\]/g, '\\$&') + '\\b', 'i').test(value);
|
||||
});
|
||||
});
|
||||
|
||||
const operators = [row.operator, row.operatorCallsign, row.owner];
|
||||
|
||||
Reference in New Issue
Block a user