From 4dd10b893d9232849f390222a9c934f8ef26fc31 Mon Sep 17 00:00:00 2001 From: okchangwon Date: Thu, 13 Aug 2020 19:03:15 +0900 Subject: [PATCH] fix: check if 'btoa' exists for old IE versions --- src/runtime/injectStylesIntoStyleTag.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/injectStylesIntoStyleTag.js b/src/runtime/injectStylesIntoStyleTag.js index 6914b715..3cf24737 100644 --- a/src/runtime/injectStylesIntoStyleTag.js +++ b/src/runtime/injectStylesIntoStyleTag.js @@ -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))) )} */`;