@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eluvio/elv-client-js",
3
- "version": "4.0.142",
3
+ "version": "4.0.143",
4
4
  "description": "Javascript client for the Eluvio Content Fabric",
5
5
  "main": "src/index.js",
6
6
  "author": "Kevin Talmadge",
@@ -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, versionHash})).hash;
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;