From 7c5d00f8a42238f2a973c0dbb8d64334ea5d4be1 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Thu, 28 Oct 2021 17:56:51 +0200 Subject: [PATCH] :bug: Fix problem with export --- .../sidebar/options/menus/exports.cljs | 25 +++++++------------ 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/exports.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/exports.cljs index 1b63eaeed..9dbe80aca 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/exports.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/exports.cljs @@ -20,22 +20,15 @@ (defn request-export [shape exports] - (let [result-stream - (->> st/stream - (rx/filter dwp/shapes-persited-event?) - (rx/take 1) - (rx/flat-map - #(rp/query! - :export - {:page-id (:page-id shape) - :file-id (:file-id shape) - :object-id (:id shape) - :name (:name shape) - :exports exports})))] - - ;; Force a persist before exporting otherwise the exported shape could be outdated - (st/emit! ::dwp/force-persist) - result-stream)) + ;; Force a persist before exporting otherwise the exported shape could be outdated + (st/emit! ::dwp/force-persist) + (rp/query! + :export + {:page-id (:page-id shape) + :file-id (:file-id shape) + :object-id (:id shape) + :name (:name shape) + :exports exports})) (mf/defc exports-menu [{:keys [shape page-id file-id] :as props}]