⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 244271 in webkit


Ignore:
Timestamp:
Apr 15, 2019, 10:31:46 AM (7 years ago)
Author:
Devin Rousso
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):

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r244270 r244271  
     12019-04-15  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: Uncaught Exception: null is not an object (evaluating 'this.selectedTreeElement.reveal')
     4        https://bugs.webkit.org/show_bug.cgi?id=196804
     5        <rdar://problem/49800708>
     6
     7        Reviewed by Timothy Hatcher.
     8
     9        * UserInterface/Views/DOMTreeOutline.js:
     10        (WI.DOMTreeOutline.prototype.update):
     11
    1122019-04-15  Devin Rousso  <drousso@apple.com>
    213
  • trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js

    r244155 r244271  
    198198        });
    199199
     200        // It's possible that a previously selected node will no longer exist (e.g. after navigation).
     201        selectedTreeElements = selectedTreeElements.filter((x) => !!x);
     202
     203        if (!selectedTreeElements.length)
     204            return;
     205
    200206        this.selectTreeElements(selectedTreeElements);
    201         this.selectedTreeElement.reveal();
     207
     208        if (this.selectedTreeElement)
     209            this.selectedTreeElement.reveal();
    202210    }
    203211
Note: See TracChangeset for help on using the changeset viewer.