Plugin manager: fixed duplicate removal of whiteout
authorDan Fuhry <dan@enanocms.org>
Sun, 01 Aug 2010 12:41:45 -0400
changeset 1284 35380c89b5bf
parent 1283 cdbc7f48ab72
child 1285 4d511be69a5f
child 1292 0e2e476e90e8
Plugin manager: fixed duplicate removal of whiteout
includes/clientside/static/ajax.js
--- a/includes/clientside/static/ajax.js	Sat Jul 31 14:12:56 2010 -0400
+++ b/includes/clientside/static/ajax.js	Sun Aug 01 12:41:45 2010 -0400
@@ -1626,7 +1626,10 @@
 				response = parseJSON(response);
 				if ( blackbox )
 				{
-					blackbox.parentNode.removeChild(blackbox);
+					if ( blackbox.parentNode )
+					{
+						blackbox.parentNode.removeChild(blackbox);
+					}
 				}
 				if ( response.success )
 				{
@@ -1668,7 +1671,10 @@
 							{
 								if ( blackbox )
 								{
-									blackbox.parentNode.removeChild(blackbox);
+									if ( blackbox.parentNode )
+									{
+										blackbox.parentNode.removeChild(blackbox);
+									}
 								}
 								var txtholder = document.createElement('div');
 								txtholder.style.textAlign = 'center';