fix: image-related fixes (#4147)
* flush queues on portal close * fix mouse broadcast race condition * stop mutating image elements when updating status to fix race condition when closing/opening collab room * check `files` when resolving `LayerUI` * fix displaying AbortError
This commit is contained in:
@ -113,7 +113,11 @@ import {
|
||||
updateBoundElements,
|
||||
} from "../element/binding";
|
||||
import { LinearElementEditor } from "../element/linearElementEditor";
|
||||
import { bumpVersion, mutateElement } from "../element/mutateElement";
|
||||
import {
|
||||
bumpVersion,
|
||||
mutateElement,
|
||||
newElementWith,
|
||||
} from "../element/mutateElement";
|
||||
import { deepCopyElement, newFreeDrawElement } from "../element/newElement";
|
||||
import {
|
||||
isBindingElement,
|
||||
@ -4268,11 +4272,7 @@ class App extends React.Component<AppProps, AppState> {
|
||||
}
|
||||
|
||||
if (erroredFiles.has(element.fileId)) {
|
||||
mutateElement(
|
||||
element,
|
||||
{ status: "error" },
|
||||
/* informMutation */ false,
|
||||
);
|
||||
newElementWith(element, { status: "error" });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -845,6 +845,7 @@ const areEqual = (prev: LayerUIProps, next: LayerUIProps) => {
|
||||
prev.renderCustomFooter === next.renderCustomFooter &&
|
||||
prev.langCode === next.langCode &&
|
||||
prev.elements === next.elements &&
|
||||
prev.files === next.files &&
|
||||
keys.every((key) => prevAppState[key] === nextAppState[key])
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user