@samitouri / QOS-React-2 / commits / 436912ab2d

Remove unnecessary logic

Dan committed Apr 8, 2019 at 23:35 UTC 436912ab2d0bbc7be0fa1b41c0376e44a940bd94
2 files changed +3 -7
shells/browser/shared/src/main.js
+2 -6
@@ -87,12 +87,8 @@ function createPanelIfReactLoaded() {
87
88 // Remember if we should sync the browser DevTools to the React tab.
89 // We'll only do that if user intentionally chooses a different React component.
90 - let lastSelectedID = null;
91 - bridge.addListener('selectElement', ({ id }) => {
92 - if (!hasReactSelectionChanged && lastSelectedID !== id) {
93 - hasReactSelectionChanged = true;
94 - lastSelectedID = id;
95 - }
90 + bridge.addListener('selectElement', () => {
91 + hasReactSelectionChanged = true;
92 });
93
94 // This flag lets us tip the Store off early that we expect to be profiling.
src/backend/agent.js
+1 -1
@@ -304,7 +304,7 @@ export default class Agent extends EventEmitter {
304 window.__REACT_DEVTOOLS_GLOBAL_HOOK__.$0 = node;
305 }
306 renderer.selectElement(id);
307 - this._bridge.send('selectElement', { id });
307 + this._bridge.send('selectElement');
308 }
309 };
310