Skip to content

Commit

Permalink
Slightly better bandaid for #83.
Browse files Browse the repository at this point in the history
  • Loading branch information
Juraj Kirchheim committed Oct 25, 2023
1 parent ab6b0cb commit 5bea3c7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/tink/state/State.hx
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,13 @@ private class SimpleState<T> extends Invalidator implements StateObject<T> {
warn('Updating state in a binding');
#end

if (!comparator.eq(value, this.value)) {
Scheduler.atomically(() -> {
Scheduler.atomically(() ->
if (!comparator.eq(value, this.value)) {
this.value = value;
fire();
});
}
}
);

return value;
}

Expand Down

0 comments on commit 5bea3c7

Please sign in to comment.