mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: stop updating text versions on init (#8191)
This commit is contained in:
parent
66a2f24296
commit
1d5b41dabb
2 changed files with 10 additions and 8 deletions
|
@ -107,8 +107,6 @@ export const mutateElement = <TElement extends Mutable<ExcalidrawElement>>(
|
|||
export const newElementWith = <TElement extends ExcalidrawElement>(
|
||||
element: TElement,
|
||||
updates: ElementUpdate<TElement>,
|
||||
/** pass `true` to always regenerate */
|
||||
force = false,
|
||||
): TElement => {
|
||||
let didChange = false;
|
||||
for (const key in updates) {
|
||||
|
@ -125,7 +123,7 @@ export const newElementWith = <TElement extends ExcalidrawElement>(
|
|||
}
|
||||
}
|
||||
|
||||
if (!didChange && !force) {
|
||||
if (!didChange) {
|
||||
return element;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue