mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2026-09-16 07:41:21 +00:00
Editor: Fix handling empty input
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user