@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.
|
@@ -3952,9 +3952,6 @@ var __publicField = (obj, key, value) => {
|
|
|
3952
3952
|
}
|
|
3953
3953
|
update(payload) {
|
|
3954
3954
|
const { store } = this.client;
|
|
3955
|
-
if (!payload.canvas_marker && !payload.geo_marker) {
|
|
3956
|
-
throw new Error("Asset must have either a canvas_marker or geo_marker");
|
|
3957
|
-
}
|
|
3958
3955
|
const asset = selectAssetById(payload.offline_id)(store.getState());
|
|
3959
3956
|
if (!asset) {
|
|
3960
3957
|
throw new Error(`No asset with id ${payload.offline_id} found in the store`);
|
|
@@ -3963,6 +3960,9 @@ var __publicField = (obj, key, value) => {
|
|
|
3963
3960
|
...asset,
|
|
3964
3961
|
...payload
|
|
3965
3962
|
};
|
|
3963
|
+
if (!updatedAsset.canvas_marker && !updatedAsset.geo_marker) {
|
|
3964
|
+
throw new Error("Asset must have either a canvas_marker or geo_marker");
|
|
3965
|
+
}
|
|
3966
3966
|
this.dispatch(updateAsset(updatedAsset));
|
|
3967
3967
|
const promise = this.enqueueRequest({
|
|
3968
3968
|
description: "Edit asset",
|