diff --git a/frontend/src/components/VersionSelector.vue b/frontend/src/components/VersionSelector.vue index a926b4432..7fdc72e07 100644 --- a/frontend/src/components/VersionSelector.vue +++ b/frontend/src/components/VersionSelector.vue @@ -46,12 +46,12 @@ for (const version of selected.value) { // TODO All of this is horrible watch(selectedParents, (oldValue, newValue) => { - handleRemovedParent([...newValue.filter((x) => !oldValue.includes(x))]); - handleAddedParent([...oldValue.filter((x) => !newValue.includes(x))]); + handleRemovedParent(newValue.filter((x) => !oldValue.includes(x))); + handleAddedParent(oldValue.filter((x) => !newValue.includes(x))); }); watch(selectedSub, (oldValue, newValue) => { - handleRemovedSub([...newValue.filter((x) => !oldValue.includes(x))]); - handleAddedSub([...oldValue.filter((x) => !newValue.includes(x))]); + handleRemovedSub(newValue.filter((x) => !oldValue.includes(x))); + handleAddedSub(oldValue.filter((x) => !newValue.includes(x))); }); function handleRemovedParent(removedVersions: string[]) { diff --git a/frontend/src/pages/admin/log.vue b/frontend/src/pages/admin/log.vue index 0291d234b..ac5d95456 100644 --- a/frontend/src/pages/admin/log.vue +++ b/frontend/src/pages/admin/log.vue @@ -59,7 +59,7 @@ const requestParams = computed(() => { const { actionLogs } = useActionLogs(() => requestParams.value, router); function updateSort(col: string, sorter: Record) { - sort.value = [...Object.keys(sorter)] + sort.value = Object.keys(sorter) .map((k) => { const val = sorter[k]; if (val === -1) return "-" + k; diff --git a/frontend/src/pages/admin/user/index.vue b/frontend/src/pages/admin/user/index.vue index a8fcd6985..5d19930cc 100644 --- a/frontend/src/pages/admin/user/index.vue +++ b/frontend/src/pages/admin/user/index.vue @@ -33,7 +33,7 @@ const requestParams = computed(() => { const { users } = useUsers(() => requestParams.value); function updateSort(col: string, sorter: Record) { - sort.value = [...Object.keys(sorter)] + sort.value = Object.keys(sorter) .map((k) => { const val = sorter[k]; if (val === -1) return "-" + k; diff --git a/frontend/src/pages/authors.vue b/frontend/src/pages/authors.vue index a82217cbb..8c9e14b9e 100644 --- a/frontend/src/pages/authors.vue +++ b/frontend/src/pages/authors.vue @@ -26,7 +26,7 @@ const requestParams = computed(() => { const { authors } = useAuthors(() => requestParams.value); function updateSort(col: string, sorter: Record) { - sort.value = [...Object.keys(sorter)] + sort.value = Object.keys(sorter) .map((k) => { const val = sorter[k]; if (val === -1) return "-" + k; diff --git a/frontend/src/pages/staff.vue b/frontend/src/pages/staff.vue index f0b2c8776..a9c999f73 100644 --- a/frontend/src/pages/staff.vue +++ b/frontend/src/pages/staff.vue @@ -27,7 +27,7 @@ const requestParams = computed(() => { const { staff } = useStaff(() => requestParams.value); function updateSort(col: string, sorter: Record) { - sort.value = [...Object.keys(sorter)] + sort.value = Object.keys(sorter) .map((k) => { const val = sorter[k]; if (val === -1) return "-" + k;