Javascript function is not a function?

Mattijs's icon

Does anyone know what this means?

• error: js: (null): Javascript function is not a function, line 0

Mattijs

Peter Nyboer's icon

Here's one way to get that error...
If you declare a RegExp as a variable outside of a function, such as:
var vpattern = ".*";
var vmodifier = "i";
var vregexp = new RegExp(vpattern,vmodifier);
you'll get that error. The regexp works, it just generates an error for some reason.
There could be other reasons for this error, too.

Peter.