@th, sorry for the confusion - and thanks @AkosLukacs to point it out (I remembered it kind of reverse...).... Before clearWatch(undefined) did the same as clearWatch()... which was bad... (To be clear, I'll edit my previous post w/ remark).
The change to prevent defaulting undefined to no argument also fixed issue of clearing an already cleared watch / interval / timeout again with the same - defined - handle. Before it complained, now it just ignores. Even though cleared handles get at one point in time reused it is of no real concern (when coding properly).
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.
@th, sorry for the confusion - and thanks @AkosLukacs to point it out (I remembered it kind of reverse...).... Before clearWatch(undefined) did the same as clearWatch()... which was bad... (To be clear, I'll edit my previous post w/ remark).
The change to prevent defaulting undefined to no argument also fixed issue of clearing an already cleared watch / interval / timeout again with the same - defined - handle. Before it complained, now it just ignores. Even though cleared handles get at one point in time reused it is of no real concern (when coding properly).