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

Add check for src-less scripts in preview #111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thrashr888
Copy link

My app uses ember-cli-segment, which adds a script tag (something similar to a Google Analytics tag) to my HTML. It ends up in the preview with a <script type="text/javascript"> tag. The build fails with a Cannot read property 'indexOf' of undefined error on line 121 here, then on line 140 once that's fixed. This PR adds checks to avoid calling indexOf on script tags without src attributes.

I looked at the test and I'm not sure how you'd want to test it? I imagine the existing tests might fail if a Object { "type": "text/javascript", }, is added, but now they'll pass?

Thanks.

@thrashr888 thrashr888 changed the title add check for src-less scripts in preview Add check for src-less scripts in preview Mar 31, 2022
@chasegiunta
Copy link

chasegiunta commented Aug 25, 2023

Also ran into this. The fix in this PR seems to work on my end, but I do get a non-blocking error within storybook though

image

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