From b32b4b8533e10d17ec5e3cef1f3133fbab0f11ad Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 14 Sep 2021 10:49:24 +0200 Subject: [PATCH] don't accept empty fragments --- src/Link.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Link.js b/src/Link.js index 9261b7f..4727077 100644 --- a/src/Link.js +++ b/src/Link.js @@ -103,6 +103,9 @@ export class Link { } static parseFragment(fragment) { + if (!fragment) { + return null; + } let [linkStr, queryParamsStr] = fragment.split("?"); if (!linkStr.startsWith("#/")) { return null;