Skip to content

Commit

Permalink
Small performance bug I found while working on #100.
Browse files Browse the repository at this point in the history
  • Loading branch information
bchavez committed Nov 3, 2017
1 parent 1a28328 commit 216ab29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Bogus/DataSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public string GetRandomArrayItem(string path, int? min = null, int? max = null)
{
var arr = GetArray(path);
if( !arr.HasValues ) return string.Empty;
return Random.ArrayElement(GetArray(path), min, max);
return Random.ArrayElement(arr, min, max);
}

/// <summary>
Expand Down

0 comments on commit 216ab29

Please sign in to comment.