mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Remove unnecessary logic
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user