@samitouri / QOS-React-2 / commits / 7aecd58d81

Nits

Dan committed Apr 8, 2019 at 23:28 UTC 7aecd58d818de7fb3dde9122be25f9c7f44eeebe
2 files changed +5 -6
shells/browser/shared/src/main.js
+1 -1
@@ -184,7 +184,7 @@ function createPanelIfReactLoaded() {
184 if (error) {
185 console.error(error);
186 } else if (didChangeSelection) {
187 - bridge.send('syncSelectionFromBrowserTools');
187 + bridge.send('syncSelectionFromNativeElementsPanel');
188 }
189 }
190 );
src/backend/agent.js
+4 -5
@@ -88,8 +88,8 @@ export default class Agent extends EventEmitter {
88 bridge.addListener('stopInspectingDOM', this.stopInspectingDOM);
89 bridge.addListener('stopProfiling', this.stopProfiling);
90 bridge.addListener(
91 - 'syncSelectionFromBrowserTools',
92 - this.syncSelectionFromBrowserTools
91 + 'syncSelectionFromNativeElementsPanel',
92 + this.syncSelectionFromNativeElementsPanel
93 );
94 bridge.addListener('shutdown', this.shutdown);
95 bridge.addListener('viewElementSource', this.viewElementSource);
@@ -299,8 +299,7 @@ export default class Agent extends EventEmitter {
299 // Update the active DOM node on the global hook object.
300 // The content script will read this to update window.$0
301 // when we switch tabs.
302 - let node: HTMLElement | null = null;
303 - node = ((renderer.findNativeByFiberID(id): any): HTMLElement);
302 + const node = ((renderer.findNativeByFiberID(id): any): HTMLElement);
303 if (node !== null) {
304 window.__REACT_DEVTOOLS_GLOBAL_HOOK__.$0 = node;
305 }
@@ -375,7 +374,7 @@ export default class Agent extends EventEmitter {
374 }
375 }
376
378 - syncSelectionFromBrowserTools = () => {
377 + syncSelectionFromNativeElementsPanel = () => {
378 const target = window.__REACT_DEVTOOLS_GLOBAL_HOOK__.$0;
379 if (target == null) {
380 return;