Skip to content
New issue

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

Check for script src existence #185

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

chasegiunta
Copy link

Fixes Cannot read properties of undefined (reading 'indexOf') error

lib/util.js Outdated Show resolved Hide resolved
@chasegiunta
Copy link
Author

@gossi Sorry, that fix earlier was only half complete. It ended up causing unclosed script tags. I've now added an additional src attribute check.

I can't say why, in our project, there are script tags being generated without src attributes, but there are, which was breaking preview head build. This just addresses that edge scenario.

If accepted, please squash

@chasegiunta chasegiunta requested a review from gossi September 8, 2023 16:14
@gossi
Copy link
Contributor

gossi commented Sep 8, 2023

CI is against your NPE fix o_O ?!?

Can you take a look. I'd have merged it if it went green.

@chasegiunta
Copy link
Author

@gossi I've tried to look, but I can't make sense of it. I'm unable to even find mention of the classify method referenced in the stack trace. Also, I have absolutely no idea how that null check could break a test, ha.

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.

2 participants