View throws error if events array is undefined