mirror of
https://github.com/drawdb-io/drawdb.git
synced 2025-08-29 02:25:26 +00:00
Fix handleColorChange when no redo action is recorded (#538)
This commit is contained in:
@@ -231,7 +231,7 @@ function EditPopoverContent({ data }) {
|
||||
e.element === ObjectType.AREA &&
|
||||
e.aid === data.id &&
|
||||
e.action === Action.EDIT &&
|
||||
e.redo.color,
|
||||
e.redo?.color,
|
||||
);
|
||||
if (lastColorChange) {
|
||||
undoColor = lastColorChange.redo.color;
|
||||
|
@@ -42,7 +42,7 @@ export default function Note({ data, onPointerDown }) {
|
||||
e.element === ObjectType.NOTE &&
|
||||
e.nid === data.id &&
|
||||
e.action === Action.EDIT &&
|
||||
e.redo.color,
|
||||
e.redo?.color,
|
||||
);
|
||||
if (lastColorChange) {
|
||||
undoColor = lastColorChange.redo.color;
|
||||
|
@@ -21,7 +21,7 @@ export default function AreaInfo({ data, i }) {
|
||||
e.element === ObjectType.AREA &&
|
||||
e.aid === data.id &&
|
||||
e.action === Action.EDIT &&
|
||||
e.redo.color,
|
||||
e.redo?.color,
|
||||
);
|
||||
if (lastColorChange) {
|
||||
undoColor = lastColorChange.redo.color;
|
||||
|
@@ -21,7 +21,7 @@ export default function NoteInfo({ data, nid }) {
|
||||
e.element === ObjectType.NOTE &&
|
||||
e.nid === data.id &&
|
||||
e.action === Action.EDIT &&
|
||||
e.redo.color,
|
||||
e.redo?.color,
|
||||
);
|
||||
if (lastColorChange) {
|
||||
undoColor = lastColorChange.redo.color;
|
||||
|
@@ -35,7 +35,7 @@ export default function TableInfo({ data }) {
|
||||
e.element === ObjectType.TABLE &&
|
||||
e.tid === data.id &&
|
||||
e.action === Action.EDIT &&
|
||||
e.redo.color,
|
||||
e.redo?.color,
|
||||
);
|
||||
if (lastColorChange) {
|
||||
undoColor = lastColorChange.redo.color;
|
||||
|
Reference in New Issue
Block a user