From 9ad2ed05b61ddf1a4e10a3fde0f1f20193949476 Mon Sep 17 00:00:00 2001 From: cnouguier Date: Thu, 19 Sep 2024 13:05:36 +0200 Subject: [PATCH] fix: Schema loaded by import should be cloned because it can be altered when applying a filter (close #949) --- core/client/composables/schema.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/client/composables/schema.js b/core/client/composables/schema.js index 7224c7beb..4297bf9ee 100644 --- a/core/client/composables/schema.js +++ b/core/client/composables/schema.js @@ -18,7 +18,7 @@ export function useSchema () { // load the schema file logger.trace('[KDK] Loading schema ', schemaNameOrObject) const schemaModule = await import(`@schemas/${schemaNameOrObject}.json`) - schema.value = schemaModule.default + schema.value = _.cloneDeep(schemaModule.default) } else { // clone the schema object logger.trace('setting schema ', schemaNameOrObject.$id)