Fixed save manager loading old version of save previously opened
This commit is contained in:
parent
a46c973bad
commit
b370d32797
1 changed files with 2 additions and 9 deletions
|
@ -61,15 +61,7 @@ import Modal from "components/Modal.vue";
|
||||||
import player, { PlayerData } from "game/player";
|
import player, { PlayerData } from "game/player";
|
||||||
import settings from "game/settings";
|
import settings from "game/settings";
|
||||||
import { getUniqueID, loadSave, save, newSave } from "util/save";
|
import { getUniqueID, loadSave, save, newSave } from "util/save";
|
||||||
import {
|
import { ComponentPublicInstance, computed, nextTick, ref, shallowReactive, watch } from "vue";
|
||||||
ComponentPublicInstance,
|
|
||||||
computed,
|
|
||||||
nextTick,
|
|
||||||
ref,
|
|
||||||
shallowReactive,
|
|
||||||
unref,
|
|
||||||
watch
|
|
||||||
} from "vue";
|
|
||||||
import Select from "./fields/Select.vue";
|
import Select from "./fields/Select.vue";
|
||||||
import Text from "./fields/Text.vue";
|
import Text from "./fields/Text.vue";
|
||||||
import Save from "./Save.vue";
|
import Save from "./Save.vue";
|
||||||
|
@ -207,6 +199,7 @@ function openSave(id: string) {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||||
saves.value[player.id]!.time = player.time;
|
saves.value[player.id]!.time = player.time;
|
||||||
save();
|
save();
|
||||||
|
cachedSaves[player.id] = undefined;
|
||||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||||
loadSave(saves.value[id]!);
|
loadSave(saves.value[id]!);
|
||||||
// Delete cached version in case of opening it again
|
// Delete cached version in case of opening it again
|
||||||
|
|
Loading…
Reference in a new issue