You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During #3334 I noticed that the this set inside array observer callbacks doesn't match the doc.
It seems that this of ObserverArrayCallback should be set to Ractive. See Ractive.d.ts
The problem is inside ArrayObserver which invoke callback without changing the this: this.callback(this.pending);
To fix the issue I would do something like this: this.callback.call(this.ractive, this.pending);
however this could result in a breaking change so I would suggest to release change alongside typescript refactor version.
Arguably, this is a bug, so it wouldn't be a breaking change. I do have a few bugfixes queued in master, but I've been trying to make as few changes as possible to avoid making uncomfortable diffs here. If it's not bothering anyone, I'm fine with either fixing it now or in the ts branch.
Description:
During #3334 I noticed that the
this
set inside array observer callbacks doesn't match the doc.It seems that
this
ofObserverArrayCallback
should be set to Ractive. SeeRactive.d.ts
The problem is inside
ArrayObserver
which invoke callback without changing thethis
:this.callback(this.pending);
To fix the issue I would do something like this:
this.callback.call(this.ractive, this.pending);
however this could result in a breaking change so I would suggest to release change alongside typescript refactor version.
Versions affected:
1.3.x
Platforms affected:
All
Reproduction:
Open this fiddle and check the console:
observe function
– ArrayObserverobserve arrow
– Ractiveobserve as prop
– ArrayObserverThe text was updated successfully, but these errors were encountered: