Changeset 1080

Show
Ignore:
Timestamp:
2007-11-14 06:36:37 (2 years ago)
Author:
martinkou
Message:

Fixed a JavaScript error resulted from the previous changeset.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/classes/fckdomrange.js

    r1079 r1080  
    464464                // If the object pointed to by the startOffset and endOffset are text nodes, we need 
    465465                // to backtrack and add in the text offset to the bookmark addresses. 
    466                 if ( addrStart.nodeType == 1 && addrStart.childNodes[bookmark.Start[0]].nodeType == 3 ) 
     466                if ( addrStart.nodeType == 1 && addrStart.childNodes[bookmark.Start[0]] && addrStart.childNodes[bookmark.Start[0]].nodeType == 3 ) 
    467467                { 
    468468                        var curNode = addrStart.childNodes[bookmark.Start[0]] ; 
     
    476476                        bookmark.Start[0] = offset ; 
    477477                } 
    478                 if ( addrEnd.nodeType == 1 && addrEnd.childNodes[bookmark.End[0]].nodeType == 3 ) 
     478                if ( addrEnd.nodeType == 1 && addrEnd.childNodes[bookmark.End[0]] && addrEnd.childNodes[bookmark.End[0]].nodeType == 3 ) 
    479479                { 
    480480                        var curNode = addrEnd.childNodes[bookmark.End[0]] ;