Make WordPress Core

Ticket #31441: 31441.12.patch

File 31441.12.patch, 612 bytes (added by azaozz, 10 years ago)
  • src/wp-includes/js/tinymce/plugins/wptextpattern/plugin.js

     
    3939
    4040                        rng = editor.selection.getRng();
    4141                        node = rng.startContainer;
    42                         text = node.nodeValue;
    4342
    44                         if ( node.nodeType !== 3 ) {
     43                        if ( ! node || node.nodeType !== 3 ) {
    4544                                return;
    4645                        }
    4746
     47                        text = node.nodeValue;
    4848                        parent = editor.dom.getParent( node, 'p' );
    4949
    5050                        if ( ! parent ) {