gustafl / lexeme

A new take on language learning.
1 stars 0 forks source link

"Uncaught TypeError: Cannot read property 'parentNode' of null" #95

Open gustafl opened 8 years ago

gustafl commented 8 years ago

This error appears occasionally here:

// Make sure the parent of this textnode is not a <span>
if (node.parentNode.nodeName === 'SPAN') {  // ERROR!
    console.warn('There is already a highlight here.');
    selection.removeAllRanges();
    return;
}