We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 528ac8d commit d199834Copy full SHA for d199834
src/Generators/Types/ReadOnlyDictionaryGenerator.cs
@@ -26,7 +26,10 @@ object IAutoFakerGenerator.Generate(AutoFakerContext context)
26
{
27
try
28
29
- items = (IDictionary<TKey, TValue>)context.CachedType.CreateInstance();
+ items = (IDictionary<TKey, TValue>) context.CachedType.CreateInstance();
30
+
31
+ if (items == null)
32
+ items = new Dictionary<TKey, TValue>();
33
}
34
catch //(Exception e)
35
0 commit comments