Set origin to event.origin in case of non-null event.origin rather than setting origin to itself