Challenge 1: Implementing the addRoute method #50
AbhishekTimalsina
started this conversation in
Show and tell
Replies: 1 comment
-
I think you forgot to handle the case when a URL path does not starts with a slash. I think you could handle it here: #normalizePath(path) {
let splittedNormalizedPath = path.split("/").filter((path) => {
if (!path) return;
return path;
});
return splittedNormalizedPath;
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Beta Was this translation helpful? Give feedback.
All reactions