Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined as first value of Observable.skipDuplicates() is skipped #80

Merged
merged 1 commit into from
Feb 13, 2013

Conversation

lautis
Copy link
Member

@lautis lautis commented Feb 13, 2013

When using skipDuplicates, undefined is used to mark initial previous value of streams. This works fine unless undefined is actually emitted to stream.

Bacon.once(undefined).skipDuplicates()
# => expected: undefined, result: no events

This PR also causes the first comparison to be skipped when custom isEqual function is used, which changes the semantics slightly, but can be useful if your comparison function looks like

(a, b) -> a.x == b.x

raimohanska added a commit that referenced this pull request Feb 13, 2013
Undefined as first value of Observable.skipDuplicates() is skipped
@raimohanska raimohanska merged commit 834788c into baconjs:master Feb 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants