@opentermsarchive/engine 13.0.0 → 13.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -260,6 +260,9 @@ async function loadServiceHistoryFiles(serviceId) {
|
|
|
260
260
|
]);
|
|
261
261
|
|
|
262
262
|
Object.entries(serviceDeclaration.terms).forEach(([ termsType, declaration ]) => {
|
|
263
|
+
if (!Array.isArray(serviceHistory[termsType]) && serviceHistory[termsType] !== undefined) {
|
|
264
|
+
throw new Error(`History file for "${termsType}" is not properly formatted: expected an array but got an object. Please use [] instead of {}.`);
|
|
265
|
+
}
|
|
263
266
|
serviceHistory[termsType] = serviceHistory[termsType] || [];
|
|
264
267
|
serviceHistory[termsType].push(declaration);
|
|
265
268
|
});
|