Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rshen91 committed Oct 11, 2024
1 parent a53dc6a commit c2de312
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export const DashboardListingPage = ({
kbnUrlStateStorage,
id,
timeRestore,
spaceId && unsavedFiltersToUrl && unsavedFiltersToUrl[spaceId]
(spaceId && unsavedFiltersToUrl && unsavedFiltersToUrl[spaceId]) ?? []
);
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ export const getDashboardListItemLink = (
unsavedFilters: string
) => {
const useHash = coreServices.uiSettings.get('state:storeInSessionStorage'); // use hash
const unsavedFiltersForUrl = rison.encode(unsavedFilters[id].filters);
const unsavedFiltersForUrl = unsavedFilters.length
? rison.encode(unsavedFilters[id].filters)
: [];

let url = coreServices.application.getUrlForApp(DASHBOARD_APP_ID, {
path: `#${createDashboardEditUrl(id, true, unsavedFiltersForUrl)}`,
Expand Down

0 comments on commit c2de312

Please sign in to comment.