Skip to content

Commit

Permalink
fix profiler root change error
Browse files Browse the repository at this point in the history
  • Loading branch information
bl00mber committed May 9, 2020
1 parent 539527b commit 726e89b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ import {ProfilerContext} from './ProfilerContext';
import styles from './RootSelector.css';

export default function RootSelector(_: {||}) {
const {profilingData, rootID, setRootID} = useContext(ProfilerContext);
const {profilingData, rootID, setRootID, selectFiber} = useContext(
ProfilerContext,
);

const options = [];
if (profilingData !== null) {
Expand All @@ -29,6 +31,7 @@ export default function RootSelector(_: {||}) {

const handleChange = useCallback(
({currentTarget}) => {
selectFiber(null, null);
setRootID(parseInt(currentTarget.value, 10));
},
[setRootID],
Expand Down

0 comments on commit 726e89b

Please sign in to comment.