File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -90,12 +90,12 @@ export class ResourceSectionCompletionProvider implements CompletionProvider {
9090 }
9191
9292 private isAtResourceTypeField ( context : Context ) : boolean {
93- if ( context . propertyPath [ context . propertyPath . length - 1 ] !== 'Type' ) {
94- return false ;
95- }
96- const startIndex = context . getEntityType ( ) === EntityType . ForEachResource ? 4 : 2 ;
97- const propertiesIndex = context . propertyPath . indexOf ( 'Properties' , startIndex ) ;
98- return propertiesIndex === - 1 ;
93+ const propertyPathLength = context . getEntityType ( ) === EntityType . ForEachResource ? 5 : 3 ;
94+
95+ return (
96+ context . propertyPath . length === propertyPathLength &&
97+ context . propertyPath [ context . propertyPath . length - 1 ] === 'Type'
98+ ) ;
9999 }
100100}
101101
You can’t perform that action at this time.
0 commit comments