krasimir/navigo

Regexp problem with IE11

teawithfruit opened this issue · 0 comments

If I create a RegExp based route, I got an error.
After some research, I found the problem with the following line.

const regexp = new RegExp(pattern, MATCH_REGEXP_FLAGS);

It seams, that IE11 can't interprete RegExp with flags. So I took a look into MATCH_REGEXP_FLAGS and it's empty. If I change the line from above to

const regexp = new RegExp(pattern);

everything works in IE11.

Is it necessary to keep MATCH_REGEXP_FLAGS?

Thanks!