Skip to content

Commit

Permalink
fix(#520): add fix for undefined errors (#521)
Browse files Browse the repository at this point in the history
  • Loading branch information
Decipher authored May 31, 2022
1 parent 098e111 commit ffd9d54
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/smooth-kids-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"druxt-views": patch
---

Fixed undefined errors in DruxtView watch methods.
4 changes: 2 additions & 2 deletions packages/views/src/components/DruxtView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ export default {
watch: {
async '$route.query'(to) {
if (!Object.entries(to).length) {
if (!Object.entries(to || {}).length) {
this.model = {
filter: {},
page: null,
Expand All @@ -297,7 +297,7 @@ export default {
'model.filter': {
deep: true,
async handler(to, from) {
if (!Object.entries(to).length && !Object.entries(from).length) {
if (!Object.entries(to || {}).length && !Object.entries(from || {}).length) {
return
}
await this.$fetch()
Expand Down

0 comments on commit ffd9d54

Please sign in to comment.