Skip to content

Commit 75b14bc

Browse files
committed
Fix issue with no sort fields
1 parent 14fd532 commit 75b14bc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Build/CommonAssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
//
1616
// You can specify all the values or you can default the Revision and Build Numbers
1717
// by using the '*' as shown below:
18-
[assembly: AssemblyVersion("1.0.64.0")]
19-
[assembly: AssemblyFileVersion("1.0.64.0")]
18+
[assembly: AssemblyVersion("1.0.65.0")]
19+
[assembly: AssemblyFileVersion("1.0.65.0")]

Griddly.Mvc/GriddlyColumn.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Linq;
34
using System.Text.RegularExpressions;
45
using System.Web;
56
using System.Web.Helpers;
67
using System.Web.WebPages;
7-
using System.Linq;
88

99
namespace Griddly.Mvc
1010
{
@@ -65,7 +65,7 @@ public override string RenderClassName(object row, GriddlyResultPage page)
6565
if (!string.IsNullOrWhiteSpace(ClassName))
6666
classes.UnionWith(ClassName.Split(' '));
6767

68-
SortField field = !string.IsNullOrWhiteSpace(SortField) ? page.SortFields.FirstOrDefault(x => x.Field == SortField) : null;
68+
SortField field = !string.IsNullOrWhiteSpace(SortField) && page.SortFields != null ? page.SortFields.FirstOrDefault(x => x.Field == SortField) : null;
6969

7070
if (field != null)
7171
classes.Add("sorted_" + (field.Direction == SortDirection.Descending ? "d" : "a"));

0 commit comments

Comments
 (0)