From cacfbecf000a94a876ac3579260be739c99ba641 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 6 Dec 2021 15:38:31 +0100 Subject: [PATCH] Fix null refs. --- .../Tags/TagsExport.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Tags/TagsExport.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Tags/TagsExport.cs index 677503694..3b894d621 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Tags/TagsExport.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Tags/TagsExport.cs @@ -7,9 +7,9 @@ namespace Squidex.Domain.Apps.Core.Tags { - public class TagsExport + public sealed class TagsExport { - public Dictionary Tags { get; set; } + public Dictionary? Tags { get; set; } public Dictionary? Alias { get; set; } @@ -22,7 +22,12 @@ namespace Squidex.Domain.Apps.Core.Tags alias = new Dictionary(Alias); } - var tags = new Dictionary(Tags); + var tags = (Dictionary?)null; + + if (Tags != null) + { + tags = new Dictionary(Tags); + } return new TagsExport { Alias = alias, Tags = tags }; }