Add check for src-less scripts in preview
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.
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