Title: [244271] trunk/Source/WebInspectorUI
Revision
244271
Author
[email protected]
Date
2019-04-15 10:31:46 -0700 (Mon, 15 Apr 2019)

Log Message

Web Inspector: Uncaught Exception: null is not an object (evaluating 'this.selectedTreeElement.reveal')
https://bugs.webkit.org/show_bug.cgi?id=196804
<rdar://problem/49800708>

Reviewed by Timothy Hatcher.

* UserInterface/Views/DOMTreeOutline.js:
(WI.DOMTreeOutline.prototype.update):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (244270 => 244271)


--- trunk/Source/WebInspectorUI/ChangeLog	2019-04-15 17:29:26 UTC (rev 244270)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-04-15 17:31:46 UTC (rev 244271)
@@ -1,5 +1,16 @@
 2019-04-15  Devin Rousso  <[email protected]>
 
+        Web Inspector: Uncaught Exception: null is not an object (evaluating 'this.selectedTreeElement.reveal')
+        https://bugs.webkit.org/show_bug.cgi?id=196804
+        <rdar://problem/49800708>
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/DOMTreeOutline.js:
+        (WI.DOMTreeOutline.prototype.update):
+
+2019-04-15  Devin Rousso  <[email protected]>
+
         Web Inspector: Uncaught Exception: Can't find variable: WebGL2RenderingContext
         https://bugs.webkit.org/show_bug.cgi?id=196874
         <rdar://problem/49858912>

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js (244270 => 244271)


--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js	2019-04-15 17:29:26 UTC (rev 244270)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js	2019-04-15 17:31:46 UTC (rev 244271)
@@ -197,8 +197,16 @@
             return treeElement;
         });
 
+        // It's possible that a previously selected node will no longer exist (e.g. after navigation).
+        selectedTreeElements = selectedTreeElements.filter((x) => !!x);
+
+        if (!selectedTreeElements.length)
+            return;
+
         this.selectTreeElements(selectedTreeElements);
-        this.selectedTreeElement.reveal();
+
+        if (this.selectedTreeElement)
+            this.selectedTreeElement.reveal();
     }
 
     updateSelectionArea()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to