From 343ac29a570b43947cef4eebf4b948793f1c1ee0 Mon Sep 17 00:00:00 2001 From: Duong Truong Phong Date: Tue, 4 Jun 2024 09:40:30 +0700 Subject: [PATCH] phongdt:sort --- stores/dynamic-page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stores/dynamic-page.ts b/stores/dynamic-page.ts index 78f9665..14c8d0e 100644 --- a/stores/dynamic-page.ts +++ b/stores/dynamic-page.ts @@ -33,7 +33,7 @@ export const useDynamicPageStore = defineStore("dynamicPageStore", () => { sectionPublished.value = currentPage.value.sections && currentPage.value.sections.filter( (section: any) => section.isPublished && !contentArr.flat().some((_section: any) => _section && _section.data && _section.type === "section" && section.id === _section.data) - ); + ).sort((a, b) => a.order - b.order); }; -- 2.52.0