fix variable name

Obvious, in JS we don't have a '$' in front of a variable name.

fix #8193 

cc @ser72 can you verify that this fixes the issue? Thanks!