Fix JS error - assignment to undeclared variable

Turned-out to be a simple missing `let` statement

- Fixes #19