Remove unnecessary logic

This commit is contained in:
Dan
2019-04-08 23:35:01 +01:00
parent 7aecd58d81
commit 436912ab2d
2 changed files with 3 additions and 7 deletions
+2 -6
View File
@@ -87,12 +87,8 @@ function createPanelIfReactLoaded() {
// Remember if we should sync the browser DevTools to the React tab.
// We'll only do that if user intentionally chooses a different React component.
let lastSelectedID = null;
bridge.addListener('selectElement', ({ id }) => {
if (!hasReactSelectionChanged && lastSelectedID !== id) {
hasReactSelectionChanged = true;
lastSelectedID = id;
}
bridge.addListener('selectElement', () => {
hasReactSelectionChanged = true;
});
// This flag lets us tip the Store off early that we expect to be profiling.
+1 -1
View File
@@ -304,7 +304,7 @@ export default class Agent extends EventEmitter {
window.__REACT_DEVTOOLS_GLOBAL_HOOK__.$0 = node;
}
renderer.selectElement(id);
this._bridge.send('selectElement', { id });
this._bridge.send('selectElement');
}
};