FIx unrecoverable errors when using IE11

pull/1/head
yflory 6 years ago
parent 2a95127aee
commit 01f93f6f7b

@ -81,7 +81,7 @@ define([
var path = []; var path = [];
while (current !== element) { while (current !== element) {
path.unshift(current); path.unshift(current);
current = current.parentElement; current = current.parentNode;
} }
if (current === element) { // Should always be the case if (current === element) { // Should always be the case

@ -59,7 +59,7 @@ define([], function () {
var id = ''; var id = '';
if (window.nacl) { if (window.nacl) {
var hash = window.nacl.hash(window.nacl.util.decodeUTF8(msg)); var hash = window.nacl.hash(window.nacl.util.decodeUTF8(msg));
id = window.nacl.util.encodeBase64(hash.slice(0, 8)) + '|'; id = window.nacl.util.encodeBase64(hash.subarray(0, 8)) + '|';
} else { } else {
console.log("Checkpoint sent without an ID. Nacl is missing."); console.log("Checkpoint sent without an ID. Nacl is missing.");
} }

@ -40,9 +40,9 @@ define([
var makeCursor = function (id, cursor) { var makeCursor = function (id, cursor) {
if (cursors[id]) { if (cursors[id]) {
cursors[id].el.remove(); $(cursors[id].el).remove();
cursors[id].elstart.remove(); $(cursors[id].elstart).remove();
cursors[id].elend.remove(); $(cursors[id].elend).remove();
} }
cursors[id] = { cursors[id] = {
el: $('<span>', { el: $('<span>', {
@ -68,9 +68,9 @@ define([
}; };
var deleteCursor = function (id) { var deleteCursor = function (id) {
if (!cursors[id]) { return; } if (!cursors[id]) { return; }
cursors[id].el.remove(); $(cursors[id].el).remove();
cursors[id].elstart.remove(); $(cursors[id].elstart).remove();
cursors[id].elend.remove(); $(cursors[id].elend).remove();
delete cursors[id]; delete cursors[id];
}; };

Loading…
Cancel
Save