Skip to content

Commit cd5534c

Browse files
committed
adjustments for the component_api
1 parent d514570 commit cd5534c

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

dash/dash-renderer/src/actions/dependencies.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,11 @@ export function computeGraphs(dependencies, dispatchError, config) {
958958
}
959959
});
960960
const end = performance.now();
961+
if (!window.dash_component_api) {
962+
window.dash_component_api = {};
963+
}
961964
window.dash_component_api.callbackGraphTime = (end - start).toFixed(2);
965+
962966
return finalGraphs;
963967
}
964968

dash/dash-renderer/src/dashApi.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ function getLayout(componentPathOrId: DashLayoutPath | string): any {
3535
}
3636
}
3737

38-
window.dash_component_api = {
38+
window.dash_component_api = Object.assign(
39+
window.dash_component_api || {},
40+
{
3941
ExternalWrapper,
4042
DashContext,
4143
useDashContext,
@@ -46,4 +48,5 @@ window.dash_component_api = {
4648
useDevtool,
4749
useDevtoolMenuButtonClassName
4850
}
49-
};
51+
}
52+
);

0 commit comments

Comments
 (0)