api: js generator: fix hash result issue