Skip to content

Conversation

@Sanshain
Copy link

@Sanshain Sanshain commented Sep 2, 2024

I have faced with trouble when url comes as undefined (using nollup bundler). So it throws an error Cannot read property '0' of undefined. The problem I solved by a one-line check:

if (url && url[0] === "/")
/// instead of `if (url[0] === "/")`

Is it ok?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant