Skip to content

Commit

Permalink
fix: Add cachedNetwork to useMemo depencency
Browse files Browse the repository at this point in the history
  • Loading branch information
ashchan committed Aug 5, 2019
1 parent 2f6e2b1 commit 733204c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/neuron-ui/src/components/NetworkEditor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const NetworkEditor = ({
const cachedNetwork = cachedNetworks.current.find(network => network.id === id)
const usedNetworkNames = useMemo(
() => networks.map(n => n.name).filter(name => name !== ((cachedNetwork && cachedNetwork.name) || '')),
[networks]
[networks, cachedNetwork]
)
const inputs = useInputs(editor, usedNetworkNames, t)
const goBack = useGoBack(history)
Expand Down

0 comments on commit 733204c

Please sign in to comment.