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

Commit 5aacebb

Browse files
committed
Merge pull request #17 from danlister/patch-1
Fixes empty control exception when a document type is not saved after…
2 parents 5749500 + b50fb9d commit 5aacebb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Src/Our.Umbraco.DocTypeGridEditor/Helpers/DocTypeGridEditorHelper.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ private static ServiceContext Services
2424

2525
public static IPublishedContent ConvertValueToContent(string id, string docTypeAlias, string dataJson)
2626
{
27+
if (string.IsNullOrWhiteSpace(docTypeAlias))
28+
return null;
29+
2730
return (IPublishedContent)ApplicationContext.Current.ApplicationCache.RequestCache.GetCacheItem(
2831
"DocTypeGridEditorHelper.ConvertValueToContent_" + id + "_" + docTypeAlias, () =>
2932
{

0 commit comments

Comments
 (0)