From ba01f314dd9db829d9e1a96208d1ed6024f90815 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 13 Dec 2023 17:45:28 +0100 Subject: [PATCH] :bug: Fix incorrect feature context setup on file update --- backend/src/app/rpc/commands/files_update.clj | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/backend/src/app/rpc/commands/files_update.clj b/backend/src/app/rpc/commands/files_update.clj index e910e12ea..8843463b1 100644 --- a/backend/src/app/rpc/commands/files_update.clj +++ b/backend/src/app/rpc/commands/files_update.clj @@ -184,7 +184,12 @@ {:keys [id file features changes changes-with-metadata] :as params}] (binding [cfeat/*current* features cfeat/*previous* (:features file)] - (let [update-fn (cond-> update-file* + + (let [features (-> features + (set/difference cfeat/frontend-only-features) + (set/union (:features file))) + + update-fn (cond-> update-file* (contains? features "fdata/pointer-map") (wrap-with-pointer-map-context) @@ -193,11 +198,7 @@ changes (if changes-with-metadata (->> changes-with-metadata (mapcat :changes) vec) - (vec changes)) - - features (-> features - (set/difference cfeat/frontend-only-features) - (set/union (:features file)))] + (vec changes))] (when (> (:revn params) (:revn file))