[WIKI-654] fix: version history to load from html (#7754)
* fix: versions history to load from html * chore: added json and stripped to store in version history (#7755) --------- Co-authored-by: Bavisetti Narayan <72156168+NarayanBavisetti@users.noreply.github.com>
This commit is contained in:
parent
49127ebeea
commit
99bc4262c5
3 changed files with 12 additions and 3 deletions
|
|
@ -167,8 +167,11 @@ export const isEmptyHtmlString = (htmlString: string, allowedHTMLTags: string[]
|
|||
* @param {JSONContent} content
|
||||
* @returns {boolean}
|
||||
*/
|
||||
const isJSONContentEmpty = (content: JSONContent): boolean => {
|
||||
export const isJSONContentEmpty = (content: JSONContent | undefined): boolean => {
|
||||
// If it has text, check if text is meaningful
|
||||
if (!content) {
|
||||
return true;
|
||||
}
|
||||
if (content.text !== undefined) {
|
||||
return !content.text || content.text.trim() === "";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue