Skip to content

Commit 9cc9627

Browse files
committed
Fix multioutput loading
1 parent 84700ea commit 9cc9627

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

dash/dash-renderer/src/reducers/loading.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {assocPath, includes, pathOr, without} from 'ramda';
1+
import {assocPath, includes, pathOr} from 'ramda';
22

33
import {LoadingPayload} from '../actions/loading';
44

@@ -20,7 +20,13 @@ export default function loading(
2020
return action.payload.reduce((acc, load) => {
2121
const loadPath = [JSON.stringify(load.path)];
2222
const prev = pathOr<any>([], loadPath, acc);
23-
return assocPath(loadPath, without(prev, [load]), acc);
23+
return assocPath(
24+
loadPath,
25+
prev.filter(
26+
(loading: any) => loading.property !== load.property
27+
),
28+
acc
29+
);
2430
}, state);
2531
case 'LOADING':
2632
return action.payload.reduce((acc, load) => {

0 commit comments

Comments
 (0)