fix(hooks): false value was considered as undefined in javascript

Fixes #6499