Bug 1533945 - Handle selectedFrame being unknown. r=jlast
authorLogan Smyth <loganfsmyth@gmail.com>
Sat, 09 Mar 2019 02:01:38 +0000
changeset 521230 60572bfd5969
parent 521229 9c7a5a08510a
child 521231 e571d003f78d
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlast
bugs1533945
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1533945 - Handle selectedFrame being unknown. r=jlast Differential Revision: https://phabricator.services.mozilla.com/D22812
devtools/client/debugger/new/src/components/SecondaryPanes/Scopes.js
--- a/devtools/client/debugger/new/src/components/SecondaryPanes/Scopes.js
+++ b/devtools/client/debugger/new/src/components/SecondaryPanes/Scopes.js
@@ -108,17 +108,21 @@ class Scopes extends PureComponent<Props
 
   onToggleMapScopes = () => {
     this.props.toggleMapScopes();
   };
 
   renderMapScopes() {
     const { selectedFrame, shouldMapScopes } = this.props;
 
-    if (!features.mapScopes || isGeneratedId(selectedFrame.location.sourceId)) {
+    if (
+      !features.mapScopes ||
+      !selectedFrame ||
+      isGeneratedId(selectedFrame.location.sourceId)
+    ) {
       return null;
     }
 
     return (
       <div className="toggle-map-scopes" onClick={this.onToggleMapScopes}>
         <input
           type="checkbox"
           checked={shouldMapScopes ? "checked" : ""}