From e8ed9d025d44ca2c70fc9ba12b7cbf992d6b7bbe Mon Sep 17 00:00:00 2001 From: Tienson Qin Date: Tue, 30 May 2023 12:00:33 +0800 Subject: [PATCH] Remove file path from captured errors --- src/main/frontend/modules/file/core.cljs | 2 +- src/main/frontend/modules/outliner/core.cljs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/frontend/modules/file/core.cljs b/src/main/frontend/modules/file/core.cljs index f5ee06e582..373d66d266 100644 --- a/src/main/frontend/modules/file/core.cljs +++ b/src/main/frontend/modules/file/core.cljs @@ -156,7 +156,7 @@ (if (and (string/blank? new-content) (not blocks-just-deleted?)) (state/pub-event! [:capture-error {:error (js/Error. "Empty content") - :payload {:file-path file-path}}]) + :payload {}}]) (let [files [[file-path new-content]] repo (state/get-current-repo)] (file-handler/alter-files-handler! repo files {} {})))) diff --git a/src/main/frontend/modules/outliner/core.cljs b/src/main/frontend/modules/outliner/core.cljs index 8e37915e56..512b05af0e 100644 --- a/src/main/frontend/modules/outliner/core.cljs +++ b/src/main/frontend/modules/outliner/core.cljs @@ -564,8 +564,6 @@ (do (state/pub-event! [:capture-error {:error "Outliner invalid structure" :payload {:type :outliner/invalid-structure - :blocks blocks - :target-block target-block' :opt opts :data (mapv #(dissoc % :block/content) tx)}}]) (throw (ex-info "Invalid outliner data"