fix bugs with ES6 in IE

This commit is contained in:
igoradamenko
2018-05-06 14:35:32 +03:00
parent a507f7864b
commit 6ac58e3d60
+2 -2
View File
@@ -19,7 +19,7 @@
<div id="remark42"></div>
<script>
var lastHeight = 0;
setInterval(() => {
setInterval(function() {
if (document.body.offsetHeight !== lastHeight) {
lastHeight = document.body.offsetHeight;
window.parent.postMessage(JSON.stringify({ remarkIframeHeight: lastHeight }), '*');
@@ -30,7 +30,7 @@
function updateHash(event) {
try {
const data = JSON.parse(event.data);
const data = typeof event.data === 'string' ? JSON.parse(event.data) : event.data;
location.hash = data.hash;
} catch (e) {}
}