Ticket #3748: 3748.patch

File 3748.patch, 1022 bytes (added by Wiktor Walc, 10 years ago)
  • samplesprocessor.js

     
    7373                node.html = newDocument.importNode( node.html, true );
    7474                node.code = newDocument.importNode( node.code, true );
    7575
    76                 CKRELEASER.xml.replaceNodeWithNodes( newDocument, newDocument.getElementById( 'html' ), node.html.getChildNodes() );
    77                 CKRELEASER.xml.replaceNodeWithNodes( newDocument, newDocument.getElementById( 'code' ), node.code.getChildNodes() );
     76                if ( newDocument.getElementById( 'html' ) )
     77                        CKRELEASER.xml.replaceNodeWithNodes( newDocument, newDocument.getElementById( 'html' ), node.html.getChildNodes() );
     78                if ( newDocument.getElementById( 'code' ) )
     79                        CKRELEASER.xml.replaceNodeWithNodes( newDocument, newDocument.getElementById( 'code' ), node.code.getChildNodes() );
    7880
    7981                node.styles = document.getElementById( 'styles' );
    8082                node.headscript = document.getElementById( 'headscript' );
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy