Skip to content

Commit b685eb5

Browse files
committed
Fix: error message for IE
1 parent 3385873 commit b685eb5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/index.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,15 @@
160160
})
161161

162162
// Show loading error.
163-
function onLoadError() {
164-
MainContent.innerHTML = "Failed to load. Please ensure you are using the browser which supports ES2015."
163+
window.onerror = function onLoadError() {
164+
MainContent.innerHTML = "Failed to load. Please ensure you are using a browser which supports ES2015."
165165
MainContent.show()
166166
}
167167
</script>
168-
<script src="index.js" async onerror="onLoadError"></script>
168+
<script src="index.js"></script>
169+
<script>
170+
window.onerror = null
171+
</script>
169172
</body>
170173

171174
</html>

0 commit comments

Comments
 (0)