Virtual whiteboard for sketching hand-drawn like diagrams
fix: use Reflect API instead of Object.hasOwn (#7958)
Marcel Mraz4d83d1c91e8a
diff --git a/packages/excalidraw/store.ts b/packages/excalidraw/store.tsindex 5d8bb24182..8200eab8c6 100644--- a/packages/excalidraw/store.ts+++ b/packages/excalidraw/store.ts@@ -22,7 +22,7 @@ export const getObservedAppState = (appState: AppState): ObservedAppState => {selectedLinearElementId: appState.selectedLinearElement?.elementId || null,};- Object.defineProperty(observedAppState, hiddenObservedAppStateProp, {+ Reflect.defineProperty(observedAppState, hiddenObservedAppStateProp, {value: true,enumerable: false,});@@ -33,7 +33,7 @@ export const getObservedAppState = (appState: AppState): ObservedAppState => {const isObservedAppState = (appState: AppState | ObservedAppState,): appState is ObservedAppState =>- Object.hasOwn(appState, hiddenObservedAppStateProp);+ !!Reflect.get(appState, hiddenObservedAppStateProp);export type StoreActionType = "capture" | "update" | "none";