From b58c33dbc559eee7ff5b503e103c4951263214f2 Mon Sep 17 00:00:00 2001 From: Nick Peihl Date: Fri, 13 Dec 2024 09:04:40 -0500 Subject: [PATCH] `getState` is synchronous Unfortunately, the `getSerializedState` method still needs to be async since the `getDashboardState` method on the CM service is a promise. But this might change when we move reference handling to the server in https://github.com/elastic/kibana/issues/192758. --- src/plugins/dashboard/public/dashboard_api/get_dashboard_api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/dashboard/public/dashboard_api/get_dashboard_api.ts b/src/plugins/dashboard/public/dashboard_api/get_dashboard_api.ts index cda80216e1635..a0bc8fcb796db 100644 --- a/src/plugins/dashboard/public/dashboard_api/get_dashboard_api.ts +++ b/src/plugins/dashboard/public/dashboard_api/get_dashboard_api.ts @@ -172,7 +172,7 @@ export function getDashboardApi({ unifiedSearchManager.internalApi.panelsReload$ ).pipe(debounceTime(0)), getSerializedState: async () => { - const { controlGroupReferences, dashboardState, panelReferences } = await getState(); + const { controlGroupReferences, dashboardState, panelReferences } = getState(); return getDashboardContentManagementService().getDashboardState({ controlGroupReferences, currentState: dashboardState,