Skip to content

Commit 39f4ab1

Browse files
committed
fix: ignore polyfill error in Safari
1 parent 9da4827 commit 39f4ab1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/output/srcdoc.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,16 @@
103103
window.addEventListener('message', handle_message, false);
104104

105105
window.onerror = function (msg, url, lineNo, columnNo, error) {
106+
// ignore errors from import map polyfill - these are necessary for
107+
// it to detect browser support
106108
if (msg.includes('module specifier “vue”')) {
107109
// firefox only error, ignore
108110
return false
109111
}
112+
if (msg.includes('Module specifier, \'vue')) {
113+
// Safari only
114+
return false
115+
}
110116
try {
111117
parent.postMessage({ action: 'error', value: error }, '*');
112118
} catch (e) {

0 commit comments

Comments
 (0)