Skip to content
This repository was archived by the owner on Feb 10, 2024. It is now read-only.

Commit 768622a

Browse files
authored
Merge pull request #213 from slombardo/develop
Skip deserialization if the grid's json is an empty string.
2 parents 3cbe98d + 49c722b commit 768622a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Our.Umbraco.DocTypeGridEditor/ValueProcessing/DocTypeGridEditorDataValueReference.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ public IEnumerable<UmbracoEntityReference> GetReferences(object value)
3030
var result = new List<UmbracoEntityReference>();
3131
var _propertyEditors = Current.PropertyEditors;
3232
var rawJson = value == null ? string.Empty : value is string str ? str : value.ToString();
33+
34+
if(rawJson.IsNullOrWhiteSpace()) return result;
35+
3336
DeserializeGridValue(rawJson, out var dtgeValues);
3437

3538
foreach (var control in dtgeValues)

0 commit comments

Comments
 (0)