File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -125,17 +125,14 @@ class TileMesh extends THREE.Mesh<TileGeometry, LayeredMaterial> {
125
125
if ( tile . id == this . id ) {
126
126
return tile ;
127
127
} else if ( tile . level != 0 ) {
128
- // @ts -expect-error By invariant, parent is always a TileMesh
129
- return this . parent . findCommonAncestor ( tile . parent ) ;
128
+ return ( this . parent as TileMesh ) ?. findCommonAncestor ( tile . parent as TileMesh ) ;
130
129
} else {
131
130
return undefined ;
132
131
}
133
132
} else if ( tile . level < this . level ) {
134
- // @ts -expect-error By invariant, parent is always a TileMesh
135
- return this . parent . findCommonAncestor ( tile ) ;
133
+ return ( this . parent as TileMesh ) ?. findCommonAncestor ( tile as TileMesh ) ;
136
134
} else {
137
- // @ts -expect-error By invariant, parent is always a TileMesh
138
- return this . findCommonAncestor ( tile . parent ) ;
135
+ return this . findCommonAncestor ( tile . parent as TileMesh ) ;
139
136
}
140
137
}
141
138
You can’t perform that action at this time.
0 commit comments