Bug 1533945 - Handle selectedFrame being unknown. r=jlast
authorLogan Smyth <loganfsmyth@gmail.com>
Sat, 09 Mar 2019 02:01:38 +0000
changeset 463365 60572bfd59699b6b24d735a3476170e3877a77fe
parent 463364 9c7a5a08510aa3eed5ba6d7da49344ef7691e8bd
child 463366 e571d003f78d381f1d9be9d293055f628830d61b
push id80098
push userlsmyth@mozilla.com
push dateSat, 09 Mar 2019 04:16:32 +0000
treeherderautoland@60572bfd5969 [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" : ""}