Fix the test case
This commit is contained in:
		
							parent
							
								
									4c19fef998
								
							
						
					
					
						commit
						4ffcdd8267
					
				@ -64,6 +64,9 @@ export class ItemTextListPosition {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    switch (this.right.content.constructor) {
 | 
					    switch (this.right.content.constructor) {
 | 
				
			||||||
      case ContentFormat:
 | 
					      case ContentFormat:
 | 
				
			||||||
 | 
					        if (!this.right.deleted) {
 | 
				
			||||||
 | 
					          updateCurrentNonNullAttributes(this.currentAttributes, /** @type {ContentFormat} */ (this.right.content))
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        break
 | 
					        break
 | 
				
			||||||
      default:
 | 
					      default:
 | 
				
			||||||
        if (!this.right.deleted) {
 | 
					        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 {ItemTextListPosition} currPos
 | 
				
			||||||
 * @param {Object<string,any>} attributes
 | 
					 * @param {Object<string,any>} attributes
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user