From 8b3b5653b0eef8edacbfbe98185480474b5da99a Mon Sep 17 00:00:00 2001 From: grey-cat-1908 Date: Mon, 25 Mar 2024 10:17:19 +0300 Subject: [PATCH] test fix --- package.json | 1 + src/App.vue | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 22957a2..6d715e7 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "@mdi/font": "^7.4.47", "@svgdotjs/svg.js": "^3.2.0", "@vueuse/core": "^10.9.0", + "flatted": "^3.3.1", "pinia": "^2.1.7", "vue": "^3.3.11", "vue-i18n": "^9.10.2", diff --git a/src/App.vue b/src/App.vue index 60dc4cc..079afa0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -11,6 +11,8 @@ import {ExtraBranch} from "./models/map/extraBranch.ts"; import {useEventListener} from '@vueuse/core' import {Settings} from "./models/settings.ts"; +import {stringify} from 'flatted'; + const element = ref() const xcord = ref(0); @@ -100,7 +102,7 @@ function setFile(event) { } function save () { - let text = JSON.stringify(store); + let text = stringify(store); let filename = 'metroMap.json'; let element = document.createElement('a'); element.setAttribute('href', 'data:application/json;charset=utf-8,' + encodeURIComponent(text));