fix(Static Template): fix doctype injection #899
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this pull request introduce?
#897
This looks like it made its way in as part of #884. I'm a bit confused about how things were ever working though. Based on the change in this PR, it seems like things should have always been failing because
content
would have been converted to a string and that if statement would have always been true because the Regex was wrong (i.e. missing the.*
).Sorry for not catching this on the first go around though. Hopefully, things should be good with this fix.
What is the current behavior?
The
Uint8Array
content array is converted to a string in the Static template rather than being decoded.What is the new behavior?
The content is now properly decoded.
What steps did you take to test this? This is required before we can merge, make sure to test the flow you've updated.
I just tried things in Storybook. I was able to reproduce the issue before making the change and then after making the change things seem to be working again.
Checklist