@eluvio/elv-client-js 3.1.90 → 3.1.91
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-lock.json +1 -1
- package/package.json +1 -1
- package/src/client/ContentAccess.js +17 -10
package/package-lock.json
CHANGED
package/package.json
CHANGED
|
@@ -234,11 +234,14 @@ exports.ContentType = async function({name, typeId, versionHash, publicOnly=fals
|
|
|
234
234
|
if(name) {
|
|
235
235
|
this.Log("Looking up type by name in content space metadata...");
|
|
236
236
|
// Look up named type in content space metadata
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
237
|
+
try {
|
|
238
|
+
typeId = await this.ContentObjectMetadata({
|
|
239
|
+
libraryId: this.contentSpaceLibraryId,
|
|
240
|
+
objectId: this.contentSpaceObjectId,
|
|
241
|
+
metadataSubtree: UrlJoin("public", "contentTypes", name)
|
|
242
|
+
});
|
|
243
|
+
// eslint-disable-next-line no-empty
|
|
244
|
+
} catch(error) {}
|
|
242
245
|
}
|
|
243
246
|
|
|
244
247
|
if(!typeId) {
|
|
@@ -310,11 +313,15 @@ exports.ContentTypes = async function() {
|
|
|
310
313
|
this.Log(typeAddresses);
|
|
311
314
|
|
|
312
315
|
// Content space types
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
316
|
+
let contentSpaceTypes = {};
|
|
317
|
+
try {
|
|
318
|
+
contentSpaceTypes = await this.ContentObjectMetadata({
|
|
319
|
+
libraryId: this.contentSpaceLibraryId,
|
|
320
|
+
objectId: this.contentSpaceObjectId,
|
|
321
|
+
metadataSubtree: "public/contentTypes"
|
|
322
|
+
}) || {};
|
|
323
|
+
// eslint-disable-next-line no-empty
|
|
324
|
+
} catch(error) {}
|
|
318
325
|
|
|
319
326
|
const contentSpaceTypeAddresses = Object.values(contentSpaceTypes)
|
|
320
327
|
.map(typeId => this.utils.HashToAddress(typeId));
|