Skip to content

Commit b670240

Browse files
committed
Handle missing settings mappings
1 parent ab4e34b commit b670240

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Umbraco.Forms.Integrations.Commerce.EMerchantPay/Helpers/MappingFieldHelper.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Collections.Generic;
1+
using System;
2+
using System.Collections.Generic;
23
using System.Linq;
34

45
using Umbraco.Forms.Integrations.Commerce.EMerchantPay.Configuration;
@@ -18,7 +19,7 @@ public IEnumerable<string> GetMappings()
1819
{
1920
var mappings = _settingsParser.AsEnumerable(nameof(PaymentProviderSettings.MappingFields));
2021

21-
if (mappings.Count() == 0) return Enumerable.Empty<string>();
22+
if (mappings.Count() == 0) throw new ArgumentNullException(nameof(MappingFieldHelper));
2223

2324
return mappings;
2425

0 commit comments

Comments
 (0)