JS: ATNConfig can incorrectly change "alt" of 0 to null

When an ATNConfig instance is created with an alt of 0, it is
possible for it to be incorrectly changed to null due to its
"falsey" nature.
This commit is contained in:
David Tymon 2016-03-15 13:38:55 +11:00
parent d0fb48c2b8
commit eb5af71a30
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ function checkParams(params, isCfg) {
} else {
var props = {};
props.state = params.state || null;
props.alt = params.alt || null;
props.alt = (params.alt === undefined) ? null : params.alt;
props.context = params.context || null;
props.semanticContext = params.semanticContext || null;
if(isCfg) {