Skip to content

Commit 37b4ebf

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

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

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) => {return b.test(item)});
565+
}
562566
return b.test(a);
563567
},
564568

0 commit comments

Comments
 (0)