Fix warning on event field checkbox default value
@@ -714,15 +714,15 @@ class ScriptBuilder {
if (engineField !== undefined) {
const cType = engineField.field.cType;
let newValue = value;
+ if (newValue === "" || newValue === undefined) {
+ newValue = engineField.field.defaultValue || 0
+ }
if (newValue === true) {
newValue = 1;
}
if (newValue === false) {
newValue = 0;
}
- if (newValue === "" || newValue === undefined) {
- newValue = engineField.field.defaultValue || 0
- }
if (is16BitCType(cType)) {
output.push(cmd(ENGINE_FIELD_UPDATE_WORD));
output.push(hi(engineField.offset));
