uQuery: Random never takes last element (applied from uComponents changeset 018bd63444b6)

This commit is contained in:
leekelleher
2012-07-26 12:12:38 -01:00
parent 514326adfe
commit 0eefbdc610

View File

@@ -475,7 +475,7 @@ namespace umbraco
public static Node GetRandom(this IList<Node> nodes)
{
var random = umbraco.library.GetRandom();
return nodes[random.Next(0, (nodes.Count - 1))];
return nodes[random.Next(0, nodes.Count)];
}
/// <summary>