WebInspector: View throughs the exception when a child view are removed by removeChil...
[WebKit-https.git] / Source / WebCore / inspector / front-end / DatabaseTableView.js
index f4346d20bc54bc993105990a5281422d3d360f49..c7b87a20d235cefac7baa20b0c4045e80acc1604 100644 (file)
@@ -60,6 +60,7 @@ WebInspector.DatabaseTableView.prototype = {
     _queryFinished: function(columnNames, values)
     {
         this.detachChildViews();
+        this.element.removeChildren();
 
         var dataGrid = WebInspector.DataGrid.createSortableDataGrid(columnNames, values);
         if (!dataGrid) {
@@ -73,6 +74,7 @@ WebInspector.DatabaseTableView.prototype = {
 
     _queryError: function(error)
     {
+        this.detachChildViews();
         this.element.removeChildren();
 
         var errorMsgElement = document.createElement("div");