From b2095d193e93d089b9e6f3d550b417ec2ab670af Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Thu, 12 Sep 2024 14:13:03 -0300 Subject: [PATCH] Small tweak to order of definition of the default items per page to fix error in faceted block search. --- .../gutenberg-blocks/blocks/faceted-search/theme.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/views/gutenberg-blocks/blocks/faceted-search/theme.vue b/src/views/gutenberg-blocks/blocks/faceted-search/theme.vue index 0ada8cf20..2cc714e8a 100644 --- a/src/views/gutenberg-blocks/blocks/faceted-search/theme.vue +++ b/src/views/gutenberg-blocks/blocks/faceted-search/theme.vue @@ -1078,12 +1078,6 @@ } } - // If any default items per page is set, apply it - // 12 is already the default value, se we don't set this value - if (this.defaultItemsPerPage != undefined && this.defaultItemsPerPage !== 12 ) { - this.$eventBusSearch.setItemsPerPage(this.defaultItemsPerPage, true); - } - for (let key in currentQuery) { if (currentQuery[key] == 'true') currentQuery[key] = true; @@ -1105,6 +1099,12 @@ }); } + // If any default items per page is set, apply it + // 12 is already the default value, se we don't set this value + if (this.defaultItemsPerPage != undefined && this.defaultItemsPerPage !== 12 ) { + this.$eventBusSearch.setItemsPerPage(this.defaultItemsPerPage, true); + } + this.$eventBusSearchEmitter.on('isLoadingItems', isLoadingItems => { this.isLoadingItems = isLoadingItems;