Allow empty template (Fix #303)

This commit is contained in:
nicolas.dorier
2018-11-13 16:32:13 +09:00
parent a996cc2e6d
commit 8e667f6c3f
2 changed files with 2 additions and 1 deletions

View File

@@ -142,6 +142,8 @@ namespace BTCPayServer.Controllers
public ViewPointOfSaleViewModel.Item[] Parse(string template, string currency)
{
if (string.IsNullOrWhiteSpace(template))
return Array.Empty<ViewPointOfSaleViewModel.Item>();
var input = new StringReader(template);
YamlStream stream = new YamlStream();
stream.Load(input);