From 783c19a45f3b10c3cae34903d260113a7e66845d Mon Sep 17 00:00:00 2001 From: "Alessandro (Ale) Segala" <43508+ItalyPaleAle@users.noreply.github.com> Date: Sun, 29 Nov 2020 18:54:33 -0800 Subject: [PATCH] Made error message clearer Fixes #167 --- Router.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Router.svelte b/Router.svelte index 555b279..8cefbc8 100644 --- a/Router.svelte +++ b/Router.svelte @@ -266,7 +266,7 @@ class RouteItem { (typeof path == 'string' && (path.length < 1 || (path.charAt(0) != '/' && path.charAt(0) != '*'))) || (typeof path == 'object' && !(path instanceof RegExp)) ) { - throw Error('Invalid value for "path" argument') + throw Error('Invalid value for "path" argument - strings must start with / or *') } const {pattern, keys} = regexparam(path)