Conversation
Inline script tags will throw a null reference error, because there's no src or href.
Ie
```html
<script>
console.log('this tag fails')
</script>
```
|
Added some logging to figure out what this was crashing on in my build: |
|
Thanks for your bug report. I can't merge this change without a test case, and I can't seem to reproduce the issue. Could you provide one? A small example repository that fails on build would be ideal. |
|
I'm unable to get a repro outside of my private repo either. I'm not sure why. That's why I provided the trace along with the dump of the element being checked. The attribute property is entirely missing. innerHTML contains the script. Some other plugin could be injecting into html and leaving attributes out. |
Fixes an edge case that occurs when used with vue-cli. Closes #122
|
No worries, it seems a harmless change, just don't want to merge it without any tests at all. I've made a slightly different change with a test in https://github.com/waysact/webpack-subresource-integrity/tree/122-vue-cli-inline-script , would you mind pointing your app at that and see if that works? |
|
Yes, that branch worked. Thanks! |
|
Great, planning to roll a release with this tomorrow. |
|
Released in 1.4.1. |
Inline script tags (which have no attributes) will throw a null reference error, because there's no src or href.
Ie