We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I am triying to get the extension file inside of an URL like:
Object is possibly 'undefined' undefined
Playground link with relevant code
export const getUrlExtension = (url: string): string => url.split(/[#?]/)[0].split('.').pop().trim();
Throw this error: Object is possibly 'undefined'.
Object is possibly 'undefined'.
Doesn't throw any error, I think that never can be undefined.
The text was updated successfully, but these errors were encountered:
Duplicate of #30406. You can use the non-null assertion operator for this case.
Sorry, something went wrong.
@MartinJohns thanks! and sorry to duplicate the issue but I didn't find it
No branches or pull requests
Bug Report
Hi,
I am triying to get the extension file inside of an URL like:
🔎 Search Terms
Object is possibly 'undefined'
undefined
🕗 Version & Regression Information
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
Throw this error:
Object is possibly 'undefined'.
🙂 Expected behavior
Doesn't throw any error, I think that never can be undefined.
The text was updated successfully, but these errors were encountered: