Interesting, thanks - I'll file a bug for it. The issue is that a.query is null sometimes (if there is no query?), and "led" in null is returning "led" for some reason in espruino.
Try:
if (a.query && "led" in a.query) digitalWrite(LED1, a.query["led"]);
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Interesting, thanks - I'll file a bug for it. The issue is that
a.query
is null sometimes (if there is no query?), and"led" in null
is returning"led"
for some reason in espruino.Try: