From c8001d3db4d762d954853dbe7c2bb45db7a723e9 Mon Sep 17 00:00:00 2001 From: Stuart Clark Date: Tue, 27 Jun 2023 13:37:44 +1000 Subject: [PATCH] chore(#639): fix tests --- packages/views/src/components/DruxtView.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/views/src/components/DruxtView.vue b/packages/views/src/components/DruxtView.vue index 9de3c8cd8..8d76d969d 100644 --- a/packages/views/src/components/DruxtView.vue +++ b/packages/views/src/components/DruxtView.vue @@ -456,7 +456,7 @@ export default { if (viewId) { // Check if we need to bypass cache. let bypassCache = false - if (typeof settings.query.bypassCache === 'boolean') { + if (typeof (settings.query || {}).bypassCache === 'boolean') { bypassCache = settings.query.bypassCache } @@ -497,7 +497,7 @@ export default { const settings = merge($druxt.settings.views || {}, wrapperSettings, { arrayMerge: (dest, src) => src }) // Evaluate the bypass cache function. - if (typeof settings.query.bypassCache === 'function') { + if (typeof (settings.query || {}).bypassCache === 'function') { settings.query.bypassCache = !!settings.query.bypassCache(context) }