Skip to content

Commit

Permalink
fix crash when running on empty dir
Browse files Browse the repository at this point in the history
because the index placeholder couldn't have been created due to absence of notes
  • Loading branch information
srid committed Dec 28, 2023
1 parent f619f65 commit 486273f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions emanote/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
- Sidebar tree is now computed from the folgezettel graph, which is a superset of the folder hierarchy. The index page's tree inherits the same.
- The semantics of `folder-folgezettel` is now applied in inverse (see docs)
- Allow specifying `lang` attribute for HTML page in YAML config ([\#485](https://github.com/srid/emanote/pull/485))
- Bug fixes:
- Emanote no longer crashes when run on an empty directory ([\#487](https://github.com/srid/emanote/issues/487))

## 1.2.0.0 (2023-08-24)

Expand Down
2 changes: 1 addition & 1 deletion emanote/emanote.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.4
name: emanote
version: 1.3.1.1
version: 1.3.2.0
license: AGPL-3.0-only
copyright: 2022 Sridhar Ratnakumar
maintainer: [email protected]
Expand Down
4 changes: 3 additions & 1 deletion emanote/src/Emanote/Model/Type.hs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ emptyModel layers act ren ctw instanceId storkVar =
, _modelPandocRenderers = ren
, _modelCompileTailwind = ctw
, _modelInstanceID = instanceId
, _modelNotes = Ix.empty
, -- Inject a placeholder `index.md` to account for the use case of emanote
-- being run on an empty directory.
_modelNotes = Ix.empty & injectRoot
, _modelRels = Ix.empty
, _modelSData = Ix.empty
, _modelStaticFiles = Ix.empty
Expand Down

0 comments on commit 486273f

Please sign in to comment.