[WEB-1310] chore: page title can be blank (#4486)
* chore: page title can be blank * chore: handle undefined page name in the helper function
This commit is contained in:
parent
4c16ed8b23
commit
c2e293cf3b
4 changed files with 21 additions and 6 deletions
|
|
@ -72,3 +72,14 @@ export const shouldFilterPage = (page: TPage, filters: TPageFilterProps | undefi
|
|||
|
||||
return fallsInFilters;
|
||||
};
|
||||
|
||||
/**
|
||||
* @description returns the name of the project after checking for untitled page
|
||||
* @param {string | undefined} name
|
||||
* @returns {string}
|
||||
*/
|
||||
export const getPageName = (name: string | undefined) => {
|
||||
if (name === undefined) return "";
|
||||
if (!name || name.trim() === "") return "Untitled";
|
||||
return name;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue