Fixed an error while event throws false or non array

This should resolve #11177.