Changeset 848


Ignore:
Timestamp:
09/19/07 18:05:47 (8 years ago)
Author:
martinkou
Message:

Improved the safety of the indenting commands.

Location:
FCKeditor/trunk/editor/_source
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/commandclasses/fckindentcommands.js

    r846 r848  
    268268                // And replace the old list with the new forest.
    269269                var newList = FCKDomTools.ArrayToList( listArray ) ;
    270                 listNode.parentNode.replaceChild( newList.listNode, listNode ) ;
     270                if ( newList )
     271                        listNode.parentNode.replaceChild( newList.listNode, listNode ) ;
    271272
    272273                // Clean up the markers.
  • FCKeditor/trunk/editor/_source/internals/fckdomtools.js

    r846 r848  
    645645        },
    646646
    647         // Convert our internal representation of a list back to a DOM tree.
     647        // Convert our internal representation of a list back to a DOM forest.
    648648        ArrayToList : function( listArray, baseIndex )
    649649        {
     
    702702                        }
    703703                        else
    704                                 break ;
     704                                return null ;
    705705
    706706                        if ( listArray.length <= currentIndex || Math.max( listArray[currentIndex].indent, 0 ) < indentLevel )
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2015 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy