diff --git a/teammapper-backend/src/map/services/maps.service.ts b/teammapper-backend/src/map/services/maps.service.ts index b8dfa2aa..506511b0 100644 --- a/teammapper-backend/src/map/services/maps.service.ts +++ b/teammapper-backend/src/map/services/maps.service.ts @@ -32,6 +32,9 @@ export class MapsService { } async addNode(mapId: string, clientNode: IMmpClientNode): Promise { + // detached nodes are not allowed to have a parent + if (clientNode.detached && clientNode.parent) return + const existingNode = await this.nodesRepository.findOne({ where: { id: clientNode.id, nodeMapId: mapId }, });