From 43daa21b531b47b34884324dbbb84a2dce3fb3c5 Mon Sep 17 00:00:00 2001 From: Carlos Medrano Date: Mon, 6 Jul 2020 20:34:30 -0500 Subject: [PATCH] Fix type mismatches in dispatcher.js --- dispatcher.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dispatcher.js b/dispatcher.js index 510757a..84fc9ac 100644 --- a/dispatcher.js +++ b/dispatcher.js @@ -157,16 +157,17 @@ jsaction.Dispatcher = function(opt_flowFactory, opt_getHandler, opt_isWiz) { * click. */ jsaction.Dispatcher.prototype.dispatch = function(eventInfo, isGlobalDispatch) { - if (goog.isArray(eventInfo)) { + if (goog.isArrayLike(eventInfo)) { // We received the queued events from EventContract. Copy them and try to // replay. - this.queue_ = this.cloneEventInfoQueue(eventInfo); + this.queue_ = this.cloneEventInfoQueue( + /** @type {!Array} */ (eventInfo)); this.replayQueuedEvents_(); return; } - const resolvedA11yEvent = - this.maybeResolveA11yEvent(eventInfo, isGlobalDispatch); + const resolvedA11yEvent = this.maybeResolveA11yEvent( + /** @type {jsaction.EventInfo} */ (eventInfo), isGlobalDispatch); if (resolvedA11yEvent['needsRetrigger']) { return resolvedA11yEvent['event']; }