ldthomas/apg-js

ast.toXml does not use its parameter

ralfhandl opened this issue · 0 comments

Function toXml, line 193 uses the uninitialized const mode for comparison instead of the function parameter modeArg:

apg-js/src/apg-lib/ast.js

Lines 193 to 194 in 17f648c

if (typeof mode === 'string' && modeArg.length >= 3) {
const mode = modeArg.slice(0, 3).toLowerCase();

Fix proposed in PR #1