@onehat/data 1.4.4 → 1.4.5
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 +1 -1
- package/src/OneHatData.js +9 -6
package/package.json
CHANGED
package/src/OneHatData.js
CHANGED
|
@@ -282,12 +282,15 @@ export class OneHatData extends EventEmitter {
|
|
|
282
282
|
if (this.isDestroyed) {
|
|
283
283
|
throw new Error('this.createRepositories is no longer valid. OneHatData has been destroyed.');
|
|
284
284
|
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
285
|
+
const schemasArray = _.map(schemas, (schema) => schema);
|
|
286
|
+
let i, schema, repository;
|
|
287
|
+
for (i = 0; i < schemasArray.length; i++) {
|
|
288
|
+
schema = schemasArray[i];
|
|
289
|
+
repository = await this.createRepository({ schema, }, bound);
|
|
290
|
+
if (!repository) {
|
|
291
|
+
throw new Error('Repository could not be created');
|
|
292
|
+
}
|
|
293
|
+
}
|
|
291
294
|
return this;
|
|
292
295
|
}
|
|
293
296
|
|