Skip to content

Commit

Permalink
Made error message clearer
Browse files Browse the repository at this point in the history
Fixes #167
  • Loading branch information
ItalyPaleAle authored Nov 30, 2020
1 parent bacd869 commit 783c19a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Router.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 783c19a

Please sign in to comment.