Bug 1533945 - Handle selectedFrame being unknown. r=jlast
authorLogan Smyth <loganfsmyth@gmail.com>
Sat, 09 Mar 2019 02:01:38 +0000
changeset 521230 60572bfd59699b6b24d735a3476170e3877a77fe
parent 521229 9c7a5a08510aa3eed5ba6d7da49344ef7691e8bd
child 521231 e571d003f78d381f1d9be9d293055f628830d61b
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" : ""}