File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -787,8 +787,8 @@ export class AnkiTemplateRenderer {
787787 _extractGlossaryStructuredContentRecursive ( content ) {
788788 /** @type {import('structured-content.js').Content[] } */
789789 const extractedContent = [ ] ;
790- while ( content . length > 0 ) {
791- const structuredContent = content . shift ( ) ;
790+ for ( let i = 0 ; i < content . length ; i ++ ) {
791+ const structuredContent = content [ i ] ;
792792 if ( Array . isArray ( structuredContent ) ) {
793793 extractedContent . push ( ...this . _extractGlossaryStructuredContentRecursive ( structuredContent ) ) ;
794794 } else if ( typeof structuredContent === 'object' && structuredContent ) {
@@ -800,8 +800,6 @@ export class AnkiTemplateRenderer {
800800 if ( structuredContent . content ) {
801801 extractedContent . push ( ...this . _extractGlossaryStructuredContentRecursive ( [ structuredContent . content ] ) ) ;
802802 }
803- } else if ( typeof structuredContent === 'string' ) {
804- extractedContent . push ( structuredContent ) ;
805803 }
806804 }
807805
You can’t perform that action at this time.
0 commit comments