Skip to content

Commit

Permalink
fix: Saving a layer update the project even if from another planet (c…
Browse files Browse the repository at this point in the history
…loses #879)
  • Loading branch information
claustres committed Jun 13, 2024
1 parent 41768ae commit 3844089
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion map/client/components/catalog/KCreateView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default {
this.creating = true
const createdView = await this.kActivity.saveContext(view)
// Add view to current project ? Check if not coming from another planet first
if (this.project && (project.getPlanetApi() === this.$api)) {
if (this.project && (this.project.getPlanetApi() === this.$api)) {
this.project.views.push({ _id: createdView._id })
await this.$api.getService('projects').patch(this.project._id, {
views: this.project.views
Expand Down
2 changes: 1 addition & 1 deletion map/client/mixins/mixin.activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export const activity = {
createdLayer = await layers.saveLayer(layer)
}
// Add layer to current project ? Check if not coming from another planet first
if (this.project && (project.getPlanetApi() === this.$api)) {
if (this.project && (this.project.getPlanetApi() === this.$api)) {
this.project.layers.push({ _id: createdLayer._id })
await this.$api.getService('projects').patch(this.project._id, {
layers: this.project.layers
Expand Down

0 comments on commit 3844089

Please sign in to comment.