From 9753ef9618f4ca11a6c58f415869a7c417c4eb24 Mon Sep 17 00:00:00 2001 From: Ian Harrigan Date: Wed, 7 Feb 2024 17:30:02 +0100 Subject: [PATCH] contains ===> indexOf (haxe 4.0.5) --- haxe/ui/backend/ComponentBase.hx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/haxe/ui/backend/ComponentBase.hx b/haxe/ui/backend/ComponentBase.hx index c1dc39479..85bdf0bb2 100644 --- a/haxe/ui/backend/ComponentBase.hx +++ b/haxe/ui/backend/ComponentBase.hx @@ -401,7 +401,7 @@ class ComponentBase extends ComponentSurface implements IClonable **/ @:dox(group = "Event related properties and methods") public function dispatch(event:T, target:Component = null) { - if (_pausedEvents != null && _pausedEvents.contains(event.type)) { + if (_pausedEvents != null && _pausedEvents.indexOf(event.type) != -1) { return; } if (event != null) { @@ -601,7 +601,7 @@ class ComponentBase extends ComponentSurface implements IClonable if (_pausedEvents == null) { _pausedEvents = []; } - if (!_pausedEvents.contains(type)) { + if (_pausedEvents.indexOf(type) == -1) { _pausedEvents.push(type); } @@ -618,7 +618,7 @@ class ComponentBase extends ComponentSurface implements IClonable resumeEvent(type, false, recursive); }); } else { - if (_pausedEvents != null && _pausedEvents.contains(type)) { + if (_pausedEvents != null && _pausedEvents.indexOf(type) != -1) { _pausedEvents.remove(type); }