Skip to content

Commit c378ace

Browse files
committed
null check
1 parent 4dedddf commit c378ace

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Bicep.Core/TypeSystem/Providers/Extensibility/ExtensionResourceTypeLoader.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ public ExtensionResourceTypeLoader(ITypeLoader typeLoader, TypeIndex? typeIndex
3232
this.availableTypes = typeIndex.Resources.ToImmutableDictionary(x => ResourceTypeReference.Parse(x.Key), x => x.Value);
3333
this.typeSettings = typeIndex.Settings;
3434
this.fallbackResourceType = typeIndex.FallbackResourceType;
35-
// already published types may not have namespace function property
36-
this.namespaceFunctions = typeIndex.NamespaceFunctions is null ? [] : [..typeIndex.NamespaceFunctions];
35+
36+
this.namespaceFunctions = typeIndex.NamespaceFunctions is { } nsFuncs ? [..nsFuncs] : []; // already published types may not have namespace function property
3737
}
3838

3939
public IEnumerable<ResourceTypeReference> GetAvailableTypes()

0 commit comments

Comments
 (0)