aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/WixToolset.Data/IntermediateSection.cs9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/WixToolset.Data/IntermediateSection.cs b/src/WixToolset.Data/IntermediateSection.cs
index 54758136..b46d20ba 100644
--- a/src/WixToolset.Data/IntermediateSection.cs
+++ b/src/WixToolset.Data/IntermediateSection.cs
@@ -1,4 +1,4 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. 1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2 2
3namespace WixToolset.Data 3namespace WixToolset.Data
4{ 4{
@@ -67,14 +67,9 @@ namespace WixToolset.Data
67 var id = jsonObject.GetValueOrDefault<string>("id"); 67 var id = jsonObject.GetValueOrDefault<string>("id");
68 var type = jsonObject.GetEnumOrDefault("type", SectionType.Unknown); 68 var type = jsonObject.GetEnumOrDefault("type", SectionType.Unknown);
69 69
70 if (null == id && (SectionType.Unknown != type && SectionType.Fragment != type))
71 {
72 throw new ArgumentException("JSON object is not a valid section");
73 }
74
75 if (SectionType.Unknown == type) 70 if (SectionType.Unknown == type)
76 { 71 {
77 throw new ArgumentException("JSON object is not a valid section", nameof(type)); 72 throw new ArgumentException("JSON object is not a valid section, unknown section type", nameof(type));
78 } 73 }
79 74
80 var section = new IntermediateSection(id, type, codepage); 75 var section = new IntermediateSection(id, type, codepage);