Skip to content

Commit

Permalink
plotly#1049: dcc.Location callback fires twice, do not triggerDefault…
Browse files Browse the repository at this point in the history
…State in locations pathname property
  • Loading branch information
jgoday committed Feb 18, 2020
1 parent 8ee3588 commit 5681290
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dash-renderer/src/actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,14 @@ function triggerDefaultState(dispatch, getState) {
const inputNodeIds = [];
allNodes.reverse();
allNodes.forEach(nodeId => {
const componentId = nodeId.split('.')[0];
const [componentId, propertyName] = nodeId.split('.');
/*
* Filter out the outputs,
* inputs that aren't leaves,
* and the invisible inputs
*/
if (
propertyName !== "pathname" &&
InputGraph.dependenciesOf(nodeId).length > 0 &&
InputGraph.dependantsOf(nodeId).length === 0 &&
has(componentId, getState().paths)
Expand Down

0 comments on commit 5681290

Please sign in to comment.