Skip to content

Commit

Permalink
fix: re-find issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tiensonqin committed May 20, 2021
1 parent ad1db33 commit 717391e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/frontend/handler/block.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
(if (seq blocks)
blocks
(let [page-block (when page-name (db/pull [:block/name (string/lower-case page-name)]))
create-title-property? (util/include-windows-reserved-chars? page-name)
create-title-property? (and page-name (util/include-windows-reserved-chars? page-name))
content (if create-title-property?
(let [title (or (:block/original-name page-block)
(:block/name page-block))
Expand Down
2 changes: 1 addition & 1 deletion src/main/frontend/handler/page.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
tx (block/page-name->map title true)
format (state/get-preferred-format)
page-entity [:block/uuid (:block/uuid tx)]
create-title-property? (util/include-windows-reserved-chars? title)
create-title-property? (and title (util/include-windows-reserved-chars? title))
default-properties (default-properties-block title format page-entity)
empty-block {:block/uuid (db/new-block-id)
:block/left [:block/uuid (:block/uuid default-properties)]
Expand Down

0 comments on commit 717391e

Please sign in to comment.