Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Fix error when pass non-string
url
in fetch()
This commit fixes the error "TypeError: Cannot read properties of undefined (reading 'split')" which occurs when applying the JavaScript String split() to the `url` variable that is not a string object. To prevent this error from occurring, an if-statement has been added to check the type of the `url` variable and forces the callback return immediately for non-string values. This commit addresses issue #82.
- Loading branch information