Fixed invalid JavaScript

Signed-off-by: Daniel Fagnan <dnfagnan@gmail.com>
auto merge of #12484 : TheHydroImpulse/rust/fix_js, r=huonw