diff --git a/code/html/custom.js b/code/html/custom.js
index 8e49ecd6..8e6ebacc 100644
--- a/code/html/custom.js
+++ b/code/html/custom.js
@@ -147,7 +147,11 @@ function getData(form) {
});
// Post process
- if ("schSwitch" in data) data["schSwitch"].push(0xFF);
+ if ("schSwitch" in data) {
+ data["schSwitch"].push(0xFF);
+ } else {
+ data["schSwitch"] = [0xFF];
+ }
return data;