From 6adfa6ae161ebafd26b59aac5edb4c5db00e1a0d Mon Sep 17 00:00:00 2001 From: Steve Bauman Date: Mon, 1 Jan 2024 17:02:17 -0500 Subject: [PATCH] Omit editor ID and tab size --- composables/useProjectStoreFactory.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/composables/useProjectStoreFactory.js b/composables/useProjectStoreFactory.js index 22f492f..224f38e 100644 --- a/composables/useProjectStoreFactory.js +++ b/composables/useProjectStoreFactory.js @@ -1,3 +1,4 @@ +import collect from 'collect.js'; import download from 'downloadjs'; import { v4 as uuid } from 'uuid'; import { defineStore } from 'pinia'; @@ -81,8 +82,10 @@ export default function (id, initialValue = null) { const state = this.clone(); const json = { - settings: omit(state.settings, ['image']), - editors: state.page.editors, + settings: omit(state.settings, 'image'), + editors: collect(state.page.editors) + .map((editor) => omit(editor, ['id', 'tabSize'])) + .toArray(), }; const name = state.tab.name || 'json';