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

don't use hasOwnProperty #79

Closed
samselikoff opened this issue May 2, 2019 · 1 comment
Closed

don't use hasOwnProperty #79

samselikoff opened this issue May 2, 2019 · 1 comment
Labels

Comments

@samselikoff
Copy link
Contributor

samselikoff commented May 2, 2019

For some reason, when I wrote a LoadRecords component

<LoadRecords
  @modelName='podcast-episode'
  @params={{hash
    sort='-position'
    page=(hash limit=4)
  }}
as |isLoading isError latestEpisodes|>

and passed through this.params from my component into store.loadRecords, the hasOwnProperty check on options.backgroundReload failed. The options object was defined, but it didn't have that method on it. (Strange because native JS objects seem to have it.)

I think we should just use options.backgroundReload !== undefined to see whether the user has passed in something or not.

@samselikoff
Copy link
Contributor Author

#80 closes

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