ember-cli-storybook icon indicating copy to clipboard operation
ember-cli-storybook copied to clipboard

Check for script src existence

Open chasegiunta opened this issue 2 years ago • 3 comments

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

chasegiunta avatar Sep 06 '23 19:09 chasegiunta

@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 avatar Sep 08 '23 15:09 chasegiunta

CI is against your NPE fix o_O ?!?

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

gossi avatar Sep 08 '23 18:09 gossi

@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.

chasegiunta avatar Sep 11 '23 15:09 chasegiunta