Prevent accidentally overriding preventDefault with undefined