allow variables to have the value 0
fixes #8155 Test plan: * create a formula quiz question * make the variable definition x with a min/max of 0 * make a formula definition that uses x (ex: 5 + x). You should see a computed value, not an error message Change-Id: Ida604c4b0c10b2567ab6061e8205c823366c9aea Reviewed-on: https://gerrit.instructure.com/13127 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Zach Pendleton <zachp@instructure.com>
This commit is contained in:
parent
79c6ec2aa6
commit
f2ce2102a2
|
@ -266,7 +266,7 @@ define([
|
|||
}
|
||||
var value = predefinedVariables && predefinedVariables[tree.value];
|
||||
value = value || (variables && variables[tree.value]);
|
||||
if(!value) {
|
||||
if (value == undefined) {
|
||||
throw("undefined variable " + tree.value);
|
||||
}
|
||||
return value;
|
||||
|
|
Loading…
Reference in New Issue