check root another way
This commit is contained in:
parent
0e7b05650a
commit
ef1dc4612d
2 changed files with 5 additions and 1 deletions
|
|
@ -169,6 +169,10 @@ func testPinned(t *testing.T, outDir string) {
|
|||
name: "orientation",
|
||||
text: "a: {\n b\n c\n }\n a <- a.c\n a.b -> a\n",
|
||||
},
|
||||
{
|
||||
name: "cannot create edge between boards",
|
||||
text: `"" <-> ""`,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ func NodeBoardKind(n Node) BoardKind {
|
|||
var f *Field
|
||||
switch n := n.(type) {
|
||||
case *Field:
|
||||
if n.Name == "" {
|
||||
if n.parent == nil {
|
||||
return BoardLayer
|
||||
}
|
||||
f = ParentField(n)
|
||||
|
|
|
|||
Loading…
Reference in a new issue