From e62f88630276e7345fa618f0056659e39340a0d5 Mon Sep 17 00:00:00 2001 From: oxixes <38050447+oxixes@users.noreply.github.com> Date: Tue, 28 May 2024 13:38:02 +0200 Subject: [PATCH] Make entrypoint not required --- src/ConfigParser.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ConfigParser.js b/src/ConfigParser.js index 5cce2d8..afdafe6 100644 --- a/src/ConfigParser.js +++ b/src/ConfigParser.js @@ -175,7 +175,7 @@ function checkContactsFields(fields, place, required = false) { place[field] = []; } else if (typeof place[field] === 'string' || Array.isArray(place[field])) { - + } else { throw new TemplateParseException(`${field} field must be a list or string`); } @@ -226,7 +226,7 @@ ConfigParser.prototype.validateJson = function () { } // Extra check for the macversion field, as it currently only supports 1 and 2 if (this.data['macversion'] !== 1 && this.data['macversion'] !== 2) { - throw new TemplateParseException('Invalid value for the macversion field (currently only 1 or 2 are supported)'); + throw new TemplateParseException('Invalid value for the macversion field (currently only 1 or 2 are supported)'); } // TODO ???checkStringFields(['type'], this.data, true) // Normalize/check preferences and properties (only for widgets and operators) @@ -250,7 +250,7 @@ ConfigParser.prototype.validateJson = function () { if (this.data['type'] === 'widget') { if (this.data['macversion'] > 1) { - checkStringFields(['entrypoint'], this.data, true); + checkStringFields(['entrypoint'], this.data); } checkArrayFields(['altcontents'], this.data); @@ -266,7 +266,7 @@ ConfigParser.prototype.validateJson = function () { } } else if (this.data['type'] === 'operator') { if (this.data['macversion'] > 1) { - checkStringFields(['entrypoint'], this.data, true); + checkStringFields(['entrypoint'], this.data); } } else if (this.data['type'] === 'mashup') { checkArrayFields(['params', 'tabs', 'embedded'], this.data);