use helpers
This commit is contained in:
parent
a2cffc9341
commit
754e0ece80
1 changed files with 3 additions and 3 deletions
|
|
@ -88,13 +88,13 @@ func (c *compiler) compileField(dst *Map, kp *d2ast.KeyPath, refctx *RefContext)
|
||||||
}
|
}
|
||||||
switch NodeBoardKind(f) {
|
switch NodeBoardKind(f) {
|
||||||
case BoardScenario:
|
case BoardScenario:
|
||||||
c.overlay(dst.Parent().Parent().(*Map), f)
|
c.overlay(ParentBoard(f).Map(), f)
|
||||||
case BoardStep:
|
case BoardStep:
|
||||||
stepsMap := dst.Parent().Map()
|
stepsMap := ParentMap(f)
|
||||||
for i := range stepsMap.Fields {
|
for i := range stepsMap.Fields {
|
||||||
if stepsMap.Fields[i] == f {
|
if stepsMap.Fields[i] == f {
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
c.overlay(dst.Parent().Parent().(*Map), f)
|
c.overlay(ParentBoard(f).Map(), f)
|
||||||
} else {
|
} else {
|
||||||
c.overlay(stepsMap.Fields[i-1].Map(), f)
|
c.overlay(stepsMap.Fields[i-1].Map(), f)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue