From 9064b9f849f26a05527b154f69214e88d5a255ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Wed, 25 Sep 2024 23:40:02 +0200 Subject: [PATCH] :bug: Fix file builder hangs on export --- CHANGES.md | 1 + frontend/src/app/libs/file_builder.cljs | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index c7638bb49..f8094eb74 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -162,6 +162,7 @@ time being. - Fix problem with comments max length [Taiga #8778](https://tree.taiga.io/project/penpot/issue/8778) - Fix copy/paste images in Safari [Taiga #8771](https://tree.taiga.io/project/penpot/issue/8771) - Fix swap when the copy is the only child of a group [#5075](https://github.com/penpot/penpot/issues/5075) +- Fix file builder hangs when exporting [#5099](https://github.com/penpot/penpot/issues/5099) ## 2.1.5 diff --git a/frontend/src/app/libs/file_builder.cljs b/frontend/src/app/libs/file_builder.cljs index 1d8e2815f..05be149ac 100644 --- a/frontend/src/app/libs/file_builder.cljs +++ b/frontend/src/app/libs/file_builder.cljs @@ -265,12 +265,12 @@ (p/create (fn [resolve reject] (->> (export-file file) + (rx/filter #(not= (:type %) :progress)) (rx/take 1) (rx/subs! (fn [value] - (when (not (contains? value :type)) - (let [[_ export-blob] value] - (resolve export-blob)))) + (let [[_ export-blob] value] + (resolve export-blob))) reject)))))) (defn create-file-export [^string name]