cannot reset dom data from undefined