Skip to content

Commit

Permalink
contains ===> indexOf (haxe 4.0.5)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Feb 7, 2024
1 parent cd75fa8 commit 9753ef9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions haxe/ui/backend/ComponentBase.hx
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ class ComponentBase extends ComponentSurface implements IClonable<ComponentBase>
**/
@:dox(group = "Event related properties and methods")
public function dispatch<T:UIEvent>(event:T, target:Component = null) {
if (_pausedEvents != null && _pausedEvents.contains(event.type)) {
if (_pausedEvents != null && _pausedEvents.indexOf(event.type) != -1) {
return;
}
if (event != null) {
Expand Down Expand Up @@ -601,7 +601,7 @@ class ComponentBase extends ComponentSurface implements IClonable<ComponentBase>
if (_pausedEvents == null) {
_pausedEvents = [];
}
if (!_pausedEvents.contains(type)) {
if (_pausedEvents.indexOf(type) == -1) {
_pausedEvents.push(type);
}

Expand All @@ -618,7 +618,7 @@ class ComponentBase extends ComponentSurface implements IClonable<ComponentBase>
resumeEvent(type, false, recursive);
});
} else {
if (_pausedEvents != null && _pausedEvents.contains(type)) {
if (_pausedEvents != null && _pausedEvents.indexOf(type) != -1) {
_pausedEvents.remove(type);
}

Expand Down

0 comments on commit 9753ef9

Please sign in to comment.