We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0214358 + 6272d3e commit defdde0Copy full SHA for defdde0
ci/release/changelogs/next.md
@@ -3,3 +3,5 @@
3
#### Improvements 🧹
4
5
#### Bugfixes ⛑️
6
+
7
+- Fixes edge case of bad import syntax crashing using d2 as a library [1829](https://github.com/terrastruct/d2/pull/1829)
d2ir/import.go
@@ -12,7 +12,7 @@ import (
12
13
func (c *compiler) pushImportStack(imp *d2ast.Import) (string, bool) {
14
impPath := imp.PathWithPre()
15
- if impPath == "" && imp.Range.Path != "" {
+ if impPath == "" && imp.Range != (d2ast.Range{}) {
16
c.errorf(imp, "imports must specify a path to import")
17
return "", false
18
}
0 commit comments