diff --git a/assets/components/FuzzySearchModal.vue b/assets/components/FuzzySearchModal.vue index e4478530..98811058 100644 --- a/assets/components/FuzzySearchModal.vue +++ b/assets/components/FuzzySearchModal.vue @@ -91,8 +91,8 @@ const { results } = useFuse(query, list, { }); const data = computed(() => { - return results.value - .toSorted((a, b) => { + return [...results.value] + .sort((a, b) => { if (a.score === b.score) { if (a.item.state === b.item.state) { return b.item.created - a.item.created; diff --git a/assets/components/LogViewer/DockerEventLogItem.vue b/assets/components/LogViewer/DockerEventLogItem.vue index b1c84f79..30dcc41b 100644 --- a/assets/components/LogViewer/DockerEventLogItem.vue +++ b/assets/components/LogViewer/DockerEventLogItem.vue @@ -39,15 +39,15 @@ const { container } = useContainerContext(); const nextContainer = computed( () => - containers.value - .filter( + [ + ...containers.value.filter( (c) => c.host === container.value.host && c.created > logEntry.date && c.name === container.value.name && c.state === "running", - ) - .toSorted((a, b) => +a.created - +b.created)[0], + ), + ].sort((a, b) => +a.created - +b.created)[0], ); function redirectNow() { diff --git a/assets/pages/index.vue b/assets/pages/index.vue index 23d0e8e9..704e3dcf 100644 --- a/assets/pages/index.vue +++ b/assets/pages/index.vue @@ -39,7 +39,7 @@ const { containers, ready } = storeToRefs(containerStore) as unknown as { ready: Ref; }; -const mostRecentContainers = $computed(() => containers.value.toSorted((a, b) => +b.created - +a.created)); +const mostRecentContainers = $computed(() => [...containers.value].sort((a, b) => +b.created - +a.created)); const runningContainers = $computed(() => mostRecentContainers.filter((c) => c.state === "running")); let totalCpu = $ref(0);