javascript: fix wrong array handling
Merge pull request #244 from raichoo/javascript

javascript: fix wrong array handling