1
0

Fix: Empty markdown was never saved

This commit is contained in:
Richard Dern 2024-05-05 17:16:12 +02:00
parent eaa8cedd81
commit f6f596f22f
2 changed files with 8 additions and 4 deletions

View File

@ -177,10 +177,14 @@ public function load(): void
*/ */
public function save(): void public function save(): void
{ {
$attachmentsSaved = $this->saveAttachments();
$metadataSaved = $this->saveMetadata();
$markdownSaved = $this->saveMarkdown();
if ( if (
$this->saveAttachments() $attachmentsSaved
|| $this->saveMetadata() || $metadataSaved
|| $this->saveMarkdown() || $markdownSaved
) { ) {
$this->touch(); $this->touch();
} }

View File

@ -111,7 +111,7 @@ public function save(): bool
return false; return false;
} }
$this->disk->put($this->filename, $this->content); $this->disk->put($this->filename, $this->content ?? '');
$this->originalContent = $this->content; $this->originalContent = $this->content;