hookrouter
hookrouter copied to clipboard
If setBasepath isn't called null in the routes will have strange results
If you don't call setBasepath, then the basePathRegEx will be null
var basePathRegEx = null;
This will result in strange behavior because of string coercion, you can check like in this StackOverflow question
I've identified the following problems:
- Routes that contain the string null will never match
- Routes not containing the string null can have have it added once and still match
- The
usePathhook will not return the correct path if the current path contains the string null