Skip to content

Commit

Permalink
feat: if no map, display the canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
owulveryck committed Jun 12, 2023
1 parent 2690090 commit f1943ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/webassembly/wasm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func wtg2SVG(s string, width int, height int, withAnnotations bool) (string, err

buf := bytes.NewBufferString(s)
err := p.Parse(buf)
if err != nil {
if err != nil && err != wtg.ErrEmptyMap {
return "", err
}
if len(p.InvalidEntries) != 0 {
Expand Down
2 changes: 1 addition & 1 deletion examples/wtg2svg/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func main() {
p := wtg.NewParser()

err = p.Parse(os.Stdin)
if err != nil {
if err != nil && err != wtg.ErrEmptyMap {
log.Fatal(err)
}
if len(p.InvalidEntries) != 0 {
Expand Down

0 comments on commit f1943ad

Please sign in to comment.