WoltLabCaret.js: undefined is not an object (node.nodeType)

  • Affected Version
    WoltLab Suite 5.3
    Quote

    undefined is not an object (evaluating '(i=this.$editor[0].childNodes[this.selection.get().anchorOffset]).nodeType')

    JavaScript: WoltLabCaret.js
                    // check if the caret is now in a <p> before a <table>
                    // which also happens to be the last element
                    if (this.selection.current() === this.$editor[0]) {
                        var node = this.$editor[0].childNodes[this.selection.get().anchorOffset];
                        if (node.nodeType === Node.ELEMENT_NODE && node.nodeName === 'TABLE') {
                            block = node;
                        }
                    }

    Hier fehlt die Prüfung auf Zeile 508, ob node überhaupt gesetzt ist.


    Wir bekommen den Fehler ausschliesslich in Safari geloggt, sowohl iOS, als auch macOS.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!