allow falsy

This commit is contained in:
jane 2021-05-27 14:40:13 -04:00
parent ab651e090a
commit e1e17d2313
1 changed files with 4 additions and 1 deletions

View File

@ -18,7 +18,10 @@ export function recv(callback, errorCallback) {
con.remoteAddress + ":" + con.remotePort);
let data = [];
for (let key of Object.keys(functions)) {
data.push({ n: key.toUpperCase(), a: reqs[key] || true });
data.push({
n: key.toUpperCase(),
a: reqs[key.toLowerCase()] != undefined ? reqs[key.toLowerCase()] : true
});
}
let functions_str = JSON.stringify(data);
con.write(functions_str);