fix(app.tsx): add safe check for readyPromise (#2489)
* fix(app.tsx): add safe check for readyPromise * make type-safe Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
@ -24,7 +24,9 @@ import { ExcalidrawElement } from "../element/types";
|
||||
import { SAVE_TO_LOCAL_STORAGE_TIMEOUT } from "./app_constants";
|
||||
import { EVENT_LOAD, EVENT_SHARE, trackEvent } from "../analytics";
|
||||
|
||||
const excalidrawRef: React.MutableRefObject<ExcalidrawAPIRefValue> = {
|
||||
const excalidrawRef: React.MutableRefObject<
|
||||
MarkRequired<ExcalidrawAPIRefValue, "ready" | "readyPromise">
|
||||
> = {
|
||||
current: {
|
||||
readyPromise: resolvablePromise(),
|
||||
ready: false,
|
||||
|
Reference in New Issue
Block a user