Skip to content

Commit 62f75ea

Browse files
committed
Fix import local world favorites
1 parent a204894 commit 62f75ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/views/Favorites/dialogs/WorldImportDialog.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@
323323
D.loading = true;
324324
const data = [...worldImportTable.value.data].reverse();
325325
D.importProgressTotal = data.length;
326-
let ref = '';
326+
let ref = undefined;
327327
try {
328328
for (let i = data.length - 1; i >= 0; i--) {
329329
if (!D.loading || !isVisible.value) {
@@ -333,14 +333,14 @@
333333
if (D.worldImportFavoriteGroup) {
334334
await addFavoriteWorld(ref, D.worldImportFavoriteGroup, false);
335335
} else if (D.worldImportLocalFavoriteGroup) {
336-
addLocalWorldFavorite(ref, D.worldImportLocalFavoriteGroup);
336+
addLocalWorldFavorite(ref.id, D.worldImportLocalFavoriteGroup);
337337
}
338338
removeFromArray(worldImportTable.value.data, ref);
339339
D.worldIdList.delete(ref.id);
340340
D.importProgress++;
341341
}
342342
} catch (err) {
343-
D.errors = `Name: ${ref.name}\nWorldId: ${ref.id}\n${err}\n\n`;
343+
D.errors = `Name: ${ref?.name}\nWorldId: ${ref?.id}\n${err}\n\n`;
344344
} finally {
345345
D.importProgress = 0;
346346
D.importProgressTotal = 0;

0 commit comments

Comments
 (0)