Fix the test case

This commit is contained in:
nimishclickup 2023-02-06 15:55:20 -08:00
parent 4c19fef998
commit 4ffcdd8267

View File

@ -64,6 +64,9 @@ export class ItemTextListPosition {
}
switch (this.right.content.constructor) {
case ContentFormat:
if (!this.right.deleted) {
updateCurrentNonNullAttributes(this.currentAttributes, /** @type {ContentFormat} */ (this.right.content))
}
break
default:
if (!this.right.deleted) {
@ -209,6 +212,20 @@ const updateCurrentAttributes = (currentAttributes, format) => {
}
}
/**
* @param {Map<string,any>} currentAttributes
* @param {ContentFormat} format
*
* @private
* @function
*/
const updateCurrentNonNullAttributes = (/** @type {Map<string, any>} */ currentAttributes, /** @type {ContentFormat} */ format) => {
const { key, value } = format
if (value !== null) {
currentAttributes.set(key, value)
}
}
/**
* @param {ItemTextListPosition} currPos
* @param {Object<string,any>} attributes