Skip to content

Commit

Permalink
fix(runtime-dom): compatible event.timeStamp may be 0 (vuejs#1325)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyuzhe committed Jun 9, 2020
1 parent e6add3e commit dc6ad3b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/runtime-dom/src/modules/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ function createInvoker(
// the solution is simple: we save the timestamp when a handler is attached,
// and the handler would only fire if the event passed to it was fired
// AFTER it was attached.
if (e.timeStamp >= invoker.lastUpdated - 1) {
const timeStamp = e.timeStamp || _getNow()
if (timeStamp >= invoker.lastUpdated - 1) {
callWithAsyncErrorHandling(
patchStopImmediatePropagation(e, invoker.value),
instance,
Expand Down

0 comments on commit dc6ad3b

Please sign in to comment.