Skip to content

Commit e1bbd62

Browse files
Added check to see if componentPath is defined
If a component defined in running does not exist, the componentPath in updateComponent will be undefined. Added a check that skips the update if that is the case. Otherwise the dashboard will crash as it will try to perform operations on the undefined object that it cannot perform.
1 parent 66d564e commit e1bbd62

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

dash/dash-renderer/src/actions/callbacks.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,11 @@ function updateComponent(component_id: any, props: any) {
334334
return function (dispatch: any, getState: any) {
335335
const paths = getState().paths;
336336
const componentPath = getPath(paths, component_id);
337+
if (typeof componentPath === 'undefined') {
338+
// Can't find the component that was defined in the running keyword,
339+
// Let's skip the component to prevent the dashboard from crashing.
340+
return;
341+
}
337342
dispatch(
338343
updateProps({
339344
props,

0 commit comments

Comments
 (0)