Skip to content

Commit bc0a27b

Browse files
committed
Fix vue-router and types post-rebase
1 parent 08dfa86 commit bc0a27b

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

client/src/components/History/HistoryCard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
3030
import { storeToRefs } from "pinia";
3131
import { computed } from "vue";
32-
import { useRouter } from "vue-router/composables";
32+
import { useRouter } from "vue-router";
3333
3434
import { userOwnsHistory } from "@/api";
3535
import type { AnyHistoryEntry } from "@/api/histories";

client/src/components/History/HistoryDatasetPermissions.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts" setup>
22
import { computed, ref } from "vue";
3-
import { useRoute } from "vue-router/composables";
3+
import { useRoute } from "vue-router";
44
55
import { initRefs, updateRefs, useCallbacks } from "@/composables/datasetPermissions";
66
import { useHistoryBreadCrumbsToForProps } from "@/composables/historyBreadcrumbs";

client/src/components/History/HistoryList.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { faBurn, faPlus, faTags, faTrash, faTrashRestore } from "@fortawesome/fr
2323
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
2424
import { BAlert, BButton, BNav, BNavItem, BOverlay, BPagination } from "bootstrap-vue";
2525
import { computed, onMounted, ref, watch } from "vue";
26-
import { useRouter } from "vue-router/composables";
26+
import { useRouter } from "vue-router";
2727
2828
import {
2929
type AnyHistoryEntry,

client/src/composables/selectedItems/selectedItems.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ export function useSelectedItems<T, ComponentType extends ComponentInstanceExten
8282
function setSelected(item: T, selected: boolean, checkInRange = true) {
8383
const key = getItemKey(item as T);
8484
const newSelected = new Map(selectedItems.value);
85-
selected ? newSelected.set(key, item) : newSelected.delete(key);
85+
if (selected) {
86+
(newSelected as Map<string, T>).set(key, item);
87+
} else {
88+
newSelected.delete(key);
89+
}
8690
selectedItems.value = newSelected;
8791
breakQuerySelection();
8892

@@ -235,7 +239,7 @@ export function useSelectedItems<T, ComponentType extends ComponentInstanceExten
235239
const newItems = [...selectedItems.value.values(), ...itemsToSelect];
236240
const newEntries: Array<[string, T]> = newItems.map((item) => {
237241
const key = getItemKey(item as T);
238-
return [key, item];
242+
return [key, item as T];
239243
});
240244
selectedItems.value = new Map(newEntries);
241245
breakQuerySelection();

0 commit comments

Comments
 (0)