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

using('<path>').update(...) crashes with "TypeError: updater.apply is not a function" #67

Closed
nlepage opened this issue Jul 26, 2017 · 0 comments
Assignees
Labels
Milestone

Comments

@nlepage
Copy link
Member

nlepage commented Jul 26, 2017

Description

using('<path>').update(...) crashes with TypeError: updater.apply is not a function

Version : 0.2.0

Expected behavior

Call updater with the '<path>' argument.

Actual behavior

'<path>' argument is used as the updater.

How to reproduce

    const input = {
      pages: [1, 2, 3],
      selectedPages: [4, 5, 6],
    }
    const output = using('pages').update(input, 'selectedPages', (selectedPages, pages) => pages.map(page => page * 2))
    expect(output).toEqual({
      pages: [1, 2, 3],
      selectedPages: [2, 4, 6],
    })
@nlepage nlepage added this to the 0.3-alpha milestone Jul 26, 2017
@nlepage nlepage self-assigned this Jul 26, 2017
nlepage added a commit that referenced this issue Aug 12, 2017
nlepage added a commit that referenced this issue Aug 12, 2017
@nlepage nlepage modified the milestones: 0.2 fixes, 0.3-alpha Aug 12, 2017
nlepage added a commit that referenced this issue Aug 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant