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
-
Beta Was this translation helpful? Give feedback.
All reactions