If you create a search using the RegExp object, to search by a regular expression the key that gets created doesn't exist because toJSON for RegExp creates a black string. This can be solved by adding this line.
I have done this in my query files, but perhaps this can go in the library as well to help solve why the key doesn't get created if you are searching based on a regular expression.
If you create a search using the RegExp object, to search by a regular expression the key that gets created doesn't exist because toJSON for RegExp creates a black string. This can be solved by adding this line.
RegExp.prototype.toJSON = RegExp.prototype.toString;
I have done this in my query files, but perhaps this can go in the library as well to help solve why the key doesn't get created if you are searching based on a regular expression.