@overmap-ai/core 1.0.66 → 1.0.67-service-fixes.0

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.
@@ -3963,9 +3963,6 @@ class AssetService extends BaseApiService {
3963
3963
  }
3964
3964
  update(payload) {
3965
3965
  const { store } = this.client;
3966
- if (!payload.canvas_marker && !payload.geo_marker) {
3967
- throw new Error("Asset must have either a canvas_marker or geo_marker");
3968
- }
3969
3966
  const asset = selectAssetById(payload.offline_id)(store.getState());
3970
3967
  if (!asset) {
3971
3968
  throw new Error(`No asset with id ${payload.offline_id} found in the store`);
@@ -3974,6 +3971,9 @@ class AssetService extends BaseApiService {
3974
3971
  ...asset,
3975
3972
  ...payload
3976
3973
  };
3974
+ if (!updatedAsset.canvas_marker && !updatedAsset.geo_marker) {
3975
+ throw new Error("Asset must have either a canvas_marker or geo_marker");
3976
+ }
3977
3977
  this.dispatch(updateAsset(updatedAsset));
3978
3978
  const promise = this.enqueueRequest({
3979
3979
  description: "Edit asset",