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

TypeError in model.filter watch if not object #520

Closed
Tracked by #512 ...
Decipher opened this issue May 31, 2022 · 0 comments · Fixed by #521
Closed
Tracked by #512 ...

TypeError in model.filter watch if not object #520

Decipher opened this issue May 31, 2022 · 0 comments · Fixed by #521
Labels
bug Something isn't working module: views Related to the `druxt-views` module

Comments

@Decipher
Copy link
Member

Describe the bug
The DruxtView model.filter expects to and from to be objects, so if the are not it causes an error:

client.js?06a0:103 TypeError: Cannot convert undefined or null to object
    at Function.entries (<anonymous>)
    at _callee3$ (DruxtView.vue?889b:300:1)
    at tryCatch (runtime.js?96cf:63:1)
    at Generator.invoke [as _invoke] (runtime.js?96cf:294:1)
    at Generator.eval [as next] (runtime.js?96cf:119:1)
    at asyncGeneratorStep (asyncToGenerator.js?1da1:3:1)
    at _next (asyncToGenerator.js?1da1:25:1)
    at eval (asyncToGenerator.js?1da1:32:1)
    at new Promise (<anonymous>)
    at eval (asyncToGenerator.js?1da1:21:1)

To Reproduce
...

Expected behavior
Don't run Object functions if they aren't objects.

Media
N/A

Your Environment (please complete the following information):
N/A

Additional context
https://github.com/druxt/druxt.js/blob/develop/packages/views/src/components/DruxtView.vue#L300

@Decipher Decipher added bug Something isn't working module: views Related to the `druxt-views` module labels May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module: views Related to the `druxt-views` module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant