History: Fix regression with delete
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
1622816035
commit
0fcc2244bb
1 changed files with 1 additions and 2 deletions
|
@ -7,7 +7,6 @@ import { getCurrentHistory } from './Editor';
|
|||
import IProperties from '../../Interfaces/IProperties';
|
||||
import { AddMethod } from '../../Enums/AddMethod';
|
||||
import { IAvailableContainer } from '../../Interfaces/IAvailableContainer';
|
||||
import { transformX } from '../SVG/Elements/Container';
|
||||
import { XPositionReference } from '../../Enums/XPositionReference';
|
||||
|
||||
/**
|
||||
|
@ -58,7 +57,7 @@ export function DeleteContainer(
|
|||
setHistoryCurrentStep: Dispatch<SetStateAction<number>>
|
||||
): void {
|
||||
const history = getCurrentHistory(fullHistory, historyCurrentStep);
|
||||
const current = history[historyCurrentStep];
|
||||
const current = history[history.length - 1];
|
||||
|
||||
const mainContainerClone: IContainerModel = structuredClone(current.MainContainer);
|
||||
const container = findContainerById(mainContainerClone, containerId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue