don't accept empty fragments

This commit is contained in:
Bruno Windels 2021-09-14 10:49:24 +02:00
parent 1b6d1de059
commit b32b4b8533

View file

@ -103,6 +103,9 @@ export class Link {
} }
static parseFragment(fragment) { static parseFragment(fragment) {
if (!fragment) {
return null;
}
let [linkStr, queryParamsStr] = fragment.split("?"); let [linkStr, queryParamsStr] = fragment.split("?");
if (!linkStr.startsWith("#/")) { if (!linkStr.startsWith("#/")) {
return null; return null;