error using source/target-arrowhead on shape

This commit is contained in:
Gavin Nishizawa 2023-10-27 21:00:46 -07:00
parent 70b46bacd0
commit 2893a48191
No known key found for this signature in database
GPG key ID: AE3B177777CE55CD

View file

@ -284,6 +284,10 @@ func (c *compiler) compileField(obj *d2graph.Object, f *d2ir.Field) {
return
} else if f.Name == "vars" {
return
} else if f.Name == "source-arrowhead" || f.Name == "target-arrowhead" {
c.errorf(f.LastRef().AST(), `%#v can only be used on connections`, f.Name)
return
} else if isReserved {
c.compileReserved(&obj.Attributes, f)
return