Skip to content

Commit

Permalink
Protect on null dateFormats
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Li <[email protected]>
  • Loading branch information
joshuali925 committed Oct 21, 2021
1 parent 83a9ce3 commit 104c031
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ export const uiSettingsService = {
uiSettings = client;
},
get: (key: string, defaultOverride?: any) => {
return uiSettings?.get(key, defaultOverride);
return uiSettings?.get(key, defaultOverride) || '';
},
};
4 changes: 2 additions & 2 deletions dashboards-reports/server/routes/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default function (router: IRouter, accessInfo: AccessInfoType) {
}),
query: schema.object({
timezone: schema.string(),
dateFormat: schema.string(),
dateFormat: schema.maybe(schema.string()),
}),
},
},
Expand Down Expand Up @@ -188,7 +188,7 @@ export default function (router: IRouter, accessInfo: AccessInfoType) {
}),
query: schema.object({
timezone: schema.string(),
dateFormat: schema.string(),
dateFormat: schema.maybe(schema.string()),
}),
},
},
Expand Down

0 comments on commit 104c031

Please sign in to comment.