Editor: Fix handling empty input

This commit is contained in:
Timur Ismagilov
2022-06-11 12:36:45 +03:00
parent 9713c18b6b
commit 7a98d29c74
2 changed files with 10 additions and 18 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
package hyphae
import (
"errors"
"os"
)
@@ -11,7 +10,7 @@ import (
func FetchMycomarkupFile(h Hypha) (string, error) {
switch h := h.(type) {
case *EmptyHypha:
return "", errors.New("empty hyphae have no text")
return "", nil
case *MediaHypha:
if !h.HasTextFile() {
return "", nil