listeners order fix
This commit is contained in:
@@ -187,10 +187,9 @@ class Signal<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function add(listener:T):Void {
|
public function add(listener:T):Void {
|
||||||
if (listeners.indexOf(listener) == -1) {
|
var pos = listeners.indexOf(listener);
|
||||||
checkLock();
|
if (pos == -1) checkLock(); else listeners.splice(pos, 1);
|
||||||
listeners.push(listener);
|
listeners.push(listener);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function remove(listener:T):Void {
|
public function remove(listener:T):Void {
|
||||||
|
|||||||
Reference in New Issue
Block a user