Update frontend.js

fix from Bliz's pull.