Remove file path from captured errors

This commit is contained in:
Tienson Qin
2023-05-30 12:00:33 +08:00
parent 5cb0993f77
commit e8ed9d025d
2 changed files with 1 additions and 3 deletions

View File

@@ -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 {} {}))))

View File

@@ -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"