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

Fix multi record remove cache #605

Merged

Conversation

uulwake
Copy link
Contributor

@uulwake uulwake commented Sep 4, 2020

Summary

  • Tell us about the problem your pull request is solving.
    Currently, if we want to remove multi-record in the cache it will throw error TypeError: Cannot read property 'id' of undefined. It is caused because we are trying to access getItems in before remove hook which will return null. We can only do getItems in after remove hook. Therefore, we need to skip to clear cache in before remove hook and do that in after remove hook instead.

  • Are there any open issues that are related to this?
    No

  • Is this PR dependent on PRs in other repos?
    No

@daffl
Copy link
Member

daffl commented Sep 4, 2020

This is great, thank you! Will go out as a release shortly.

@daffl daffl merged commit 49beef5 into feathersjs-ecosystem:master Sep 4, 2020
@uulwake uulwake deleted the fix-multi-record-remove-cache branch September 5, 2020 06:05
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