@@ -383,7 +383,7 @@ function diffChildren(
383383 nodeMatching ( oldEndNode , newStartNode , replayer . mirror , rrnodeMirror )
384384 ) {
385385 try {
386- handleInsertBefore ( oldTree , oldEndNode , oldStartNode )
386+ handleInsertBefore ( oldTree , oldEndNode , oldStartNode ) ;
387387 } catch ( e ) {
388388 console . warn ( e ) ;
389389 }
@@ -577,7 +577,9 @@ export function nodeMatching(
577577/**
578578 * Copies CSSRules and their position from HTML style element which don't exist in it's innerText
579579 */
580- export function getInsertedStylesFromElement ( styleElement : HTMLStyleElement ) : Array < { index : number , cssRuleText : string } > | undefined {
580+ export function getInsertedStylesFromElement (
581+ styleElement : HTMLStyleElement ,
582+ ) : Array < { index : number ; cssRuleText : string } > | undefined {
581583 const elementCssRules = styleElement . sheet ?. cssRules ;
582584 if ( ! elementCssRules || ! elementCssRules . length ) return ;
583585 // style sheet w/ innerText styles to diff with actual and get only inserted styles
@@ -587,7 +589,8 @@ export function getInsertedStylesFromElement(styleElement: HTMLStyleElement): Ar
587589 const innerTextStylesMap : { [ key : string ] : CSSRule } = { } ;
588590
589591 for ( let i = 0 ; i < tempStyleSheet . cssRules . length ; i ++ ) {
590- innerTextStylesMap [ tempStyleSheet . cssRules [ i ] . cssText ] = tempStyleSheet . cssRules [ i ] ;
592+ innerTextStylesMap [ tempStyleSheet . cssRules [ i ] . cssText ] =
593+ tempStyleSheet . cssRules [ i ] ;
591594 }
592595
593596 const insertedStylesStyleSheet = [ ] ;
@@ -598,7 +601,7 @@ export function getInsertedStylesFromElement(styleElement: HTMLStyleElement): Ar
598601 if ( ! innerTextStylesMap [ cssRuleText ] ) {
599602 insertedStylesStyleSheet . push ( {
600603 index : i ,
601- cssRuleText
604+ cssRuleText,
602605 } ) ;
603606 }
604607 }
@@ -610,11 +613,17 @@ export function getInsertedStylesFromElement(styleElement: HTMLStyleElement): Ar
610613 * Conditionally copy insertedStyles for STYLE nodes and apply after calling insertBefore'
611614 * For non-STYLE nodes, just insertBefore
612615 */
613- function handleInsertBefore ( oldTree : Node , nodeToMove : Node , insertBeforeNode : Node | null ) : void {
616+ function handleInsertBefore (
617+ oldTree : Node ,
618+ nodeToMove : Node ,
619+ insertBeforeNode : Node | null ,
620+ ) : void {
614621 let insertedStyles ;
615622
616623 if ( nodeToMove . nodeName === 'STYLE' ) {
617- insertedStyles = getInsertedStylesFromElement ( nodeToMove as HTMLStyleElement ) ;
624+ insertedStyles = getInsertedStylesFromElement (
625+ nodeToMove as HTMLStyleElement ,
626+ ) ;
618627 }
619628
620629 oldTree . insertBefore ( nodeToMove , insertBeforeNode ) ;
0 commit comments