From 5517d28b3972d0b9fea0da9c1f6b19a727f27366 Mon Sep 17 00:00:00 2001 From: Olivier Wulveryck Date: Tue, 13 Jun 2023 09:15:25 +0200 Subject: [PATCH] feat: generate an empty canvas is map is empty --- examples/wtg2svglive/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/wtg2svglive/main.go b/examples/wtg2svglive/main.go index 3772c33..e06042c 100644 --- a/examples/wtg2svglive/main.go +++ b/examples/wtg2svglive/main.go @@ -165,7 +165,7 @@ func generateSVG(filePath string) ([]byte, error) { } defer f.Close() err = p.Parse(f) - if err != nil { + if err != nil && err != wtg.ErrEmptyMap { return nil, err } if len(p.InvalidEntries) != 0 {