Pop-up dictionary browser extension for language learning. Successor to Yomichan. (PERSONAL FORK)

Remove shift to prevent mutating content when running _convertGlossaryStructuredContentRecursive (#2287)

authored by

Kuuuube and committed by
GitHub
401031a7 65dae606

+2 -2
+2 -2
ext/js/templates/anki-template-renderer.js
··· 814 814 _convertGlossaryStructuredContentRecursive(content, structuredContentGenerator) { 815 815 /** @type {string[]} */ 816 816 const rawGlossaryContent = []; 817 - while (content.length > 0) { 818 - const structuredGloss = content.shift(); 817 + for (let i = 0; i < content.length; i++) { 818 + const structuredGloss = content[i]; 819 819 if (typeof structuredGloss === 'string') { 820 820 rawGlossaryContent.push(structuredGloss); 821 821 } else if (Array.isArray(structuredGloss)) {