Skip to content

Commit

Permalink
fix: check if 'btoa' exists for old IE versions
Browse files Browse the repository at this point in the history
  • Loading branch information
okchangwon committed Aug 13, 2020
1 parent c623f27 commit 4dd10b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/injectStylesIntoStyleTag.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function applyToTag(style, options, obj) {
style.removeAttribute('media');
}

if (sourceMap && btoa) {
if (sourceMap && typeof btoa !== 'undefined') {
css += `\n/*# sourceMappingURL=data:application/json;base64,${btoa(
unescape(encodeURIComponent(JSON.stringify(sourceMap)))
)} */`;
Expand Down

0 comments on commit 4dd10b8

Please sign in to comment.