Skip to content

Commit d633428

Browse files
committed
Check for arrays when matching regex
Signed-off-by: Harelon <harel.games@gmail.com>
1 parent 25b9a33 commit d633428

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lokijs.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,10 @@
559559
},
560560

561561
$regex: function (a, b) {
562+
if(Array.isArray(a))
563+
{
564+
return a.some(item => b.test(item));
565+
}
562566
return b.test(a);
563567
},
564568

0 commit comments

Comments
 (0)