Check if target.dataset is set in route call

If we don't check for `target.dataset`, we keep on triggering errors
when an element is clicked that does not have a `dataset`.

Signed-off-by: Kaustav Das Modak <kaustav.dasmodak@yahoo.co.in>