fix: Changing page title bugs

https://github.com/logseq/logseq/issues/1341
This commit is contained in:
Tienson Qin
2021-02-23 18:41:02 +08:00
parent e760318bb4
commit b5f695fd19
2 changed files with 8 additions and 5 deletions

View File

@@ -180,7 +180,7 @@
(reset-file! repo path content))
(db/set-file-content! repo path content))
(util/p-handle
(fs/write-file! repo (config/get-repo-dir repo) path content {:old-content original-content})
(fs/write-file! repo (config/get-repo-dir repo) path content (when original-content {:old-content original-content}))
(fn [_]
(git-handler/git-add repo path update-status?)
(when (= path (config/get-config-path repo))
@@ -188,7 +188,7 @@
(when (= path (config/get-custom-css-path repo))
(ui-handler/add-style-if-exists!))
(when re-render-root? (ui-handler/re-render-root!))
(when add-history?
(when (and add-history? original-content)
(history/add-history! repo [[path original-content content]])))
(fn [error]
(println "Write file failed, path: " path ", content: " content)