r1703 - branches/bxe_2_0/js

[email protected] Sun, 12 Aug 2007 15:39:54 +0200 (CEST)
Newsgroups gmane.editors.bitflux.cvs
Message-ID <[email protected]>
Author: chregu
Date: Sun Aug 12 15:39:54 2007
New Revision: 1703

Log:
add more null checks

Modified:
   branches/bxe_2_0/js/bxeFunctions.js

Modified: branches/bxe_2_0/js/bxeFunctions.js
==============================================================================
--- branches/bxe_2_0/js/bxeFunctions.js	(original)
+++ branches/bxe_2_0/js/bxeFunctions.js	Sun Aug 12 15:39:54 2007
@@ -2724,7 +2724,7 @@
 
 
 function bxe_checkEmpty(xmlnode, makeDefault) {
-	if (!makeDefault && xmlnode.vdom.bxeOnempty) {
+	if (!makeDefault && xmlnode.vdom && xmlnode.vdom.bxeOnempty) {
 		var par = xmlnode.parentNode;
 		if (xmlnode.vdom.bxeOnemptyType == "function") {
 			if (eval(xmlnode.vdom.bxeOnempty + "(xmlnode)")) {
@@ -2738,7 +2738,7 @@
 			return true;
 		}
 	}
-	if (makeDefault || xmlnode.vdom.bxeDefaultcontent || xmlnode.vdom.bxeTabletype == "table-cell" || xmlnode.vdom.bxeTabletype == "table-col" ) {
+	if (makeDefault ||  xmlnode.vdom && (xmlnode.vdom.bxeDefaultcontent || xmlnode.vdom.bxeTabletype == "table-cell" || xmlnode.vdom.bxeTabletype == "table-col" )) {
 		xmlnode.makeDefaultNodes();
 	} else {
 		xmlnode.parentNode.removeChild(xmlnode);
-- 
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs