@eluvio/elv-client-js 4.0.142 → 4.0.143
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
|
@@ -1098,8 +1098,12 @@ exports.ContentObjectVersions = async function({libraryId, objectId}) {
|
|
|
1098
1098
|
* @returns {Promise<string>} - The latest version hash of the object
|
|
1099
1099
|
*/
|
|
1100
1100
|
exports.LatestVersionHash = async function({objectId, versionHash}) {
|
|
1101
|
+
if(versionHash) {
|
|
1102
|
+
objectId = this.utils.DecodeVersionHash(versionHash).objectId;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1101
1105
|
try {
|
|
1102
|
-
return (await this.ContentObject({objectId
|
|
1106
|
+
return (await this.ContentObject({objectId})).hash;
|
|
1103
1107
|
} catch(error) {
|
|
1104
1108
|
error.message = `Unable to determine latest version hash for ${versionHash || objectId}`;
|
|
1105
1109
|
throw error;
|