From 33b95dd0c3f18e354f46ce73419fdad2d49b2f4d Mon Sep 17 00:00:00 2001 From: Ivan Popelyshev Date: Fri, 19 Apr 2019 18:04:10 +0300 Subject: [PATCH] fix check for existing listener --- src/flash/events/EventDispatcher.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/flash/events/EventDispatcher.ts b/src/flash/events/EventDispatcher.ts index 0b548e34ca..a76355b12b 100644 --- a/src/flash/events/EventDispatcher.ts +++ b/src/flash/events/EventDispatcher.ts @@ -60,7 +60,9 @@ module Shumway.AVMX.AS.flash.events { if (priority > entry.priority) { index = i; } else { - break; + if (priority < entry.priority) { + break; + } } } entries = this.ensureNonAliasedEntries();