Skip to content

Commit dfd6dfe

Browse files
authored
Merge pull request #2393 from rnestler/fix-hang-when-basePath-is-undefined
Fix callback crashing if getPath returns undefined
2 parents 72b8a91 + 84f2c35 commit dfd6dfe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dash/dash-renderer/src/observers/executedCallbacks.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ const observer: IStoreObserverDefinition<IStoreState> = {
127127
);
128128

129129
const basePath = getPath(oldPaths, parsedId);
130-
const oldObj = path(getPath(oldPaths, parsedId), oldLayout);
130+
if (!basePath) {
131+
return;
132+
}
133+
const oldObj = path(basePath, oldLayout);
131134

132135
const childrenProps = pathOr(
133136
'defaultValue',

0 commit comments

Comments
 (0)