Fix javascript error.
Merge pull request #1223 from najor/hotfix-0.24.x-fix-javascript-error

Fix javascript error.