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

Commit 49c722b

Browse files
committed
Fix for issue #211. Skip deserialization if the grid's json is an empty string.
1 parent 3cbe98d commit 49c722b

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)