-
• #2
My guess is the IDE is set to automatically minify modules, so when you include via the IDE they get minified.
Espruino doesn't handle
let
with scoping, so it's possible if you have usedlet
in your code a lot the minifier has decided to name two variablesa
in the same function, and that's causing some issues? Maybe if you disable module minification in the IDE settings it'll work which will at least prove the problem? -
• #3
Yes, that's it!
Both problems disappear as soon as I disable module minification.
May I solve this problem by using
var
instead oflet
? -
• #4
I got "rounded clock hands" working by replacing
let
withvar
- with minification switched on!However, the "smart clock size calculator" still produces that annoying toast...
As you may know, I'm currently developing an "Analog Clock Construction Kit" which (currently) heavily relies on external modules
require
d from GitHub.However, there are modules which behave differently depending on whether they are actually loaded from GitHub (by the Web IDE) or manually inserted into the code using the following "trick"
as a replacement for
Two modules are affected - and I don't know why:
Error: Unreachable point. logically broken. in https://raw.githubusercontent.com/rozek/banglejs-2-smart-clock-size/main/ClockSize.js
) in the WebIDEDoes anybody have any ideas how to solve these problems?