mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
fix: use Reflect API instead of Object.hasOwn (#7958)
This commit is contained in:
parent
a04676d423
commit
4d83d1c91e
1 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ export const getObservedAppState = (appState: AppState): ObservedAppState => {
|
||||||
selectedLinearElementId: appState.selectedLinearElement?.elementId || null,
|
selectedLinearElementId: appState.selectedLinearElement?.elementId || null,
|
||||||
};
|
};
|
||||||
|
|
||||||
Object.defineProperty(observedAppState, hiddenObservedAppStateProp, {
|
Reflect.defineProperty(observedAppState, hiddenObservedAppStateProp, {
|
||||||
value: true,
|
value: true,
|
||||||
enumerable: false,
|
enumerable: false,
|
||||||
});
|
});
|
||||||
|
@ -33,7 +33,7 @@ export const getObservedAppState = (appState: AppState): ObservedAppState => {
|
||||||
const isObservedAppState = (
|
const isObservedAppState = (
|
||||||
appState: AppState | ObservedAppState,
|
appState: AppState | ObservedAppState,
|
||||||
): appState is ObservedAppState =>
|
): appState is ObservedAppState =>
|
||||||
Object.hasOwn(appState, hiddenObservedAppStateProp);
|
!!Reflect.get(appState, hiddenObservedAppStateProp);
|
||||||
|
|
||||||
export type StoreActionType = "capture" | "update" | "none";
|
export type StoreActionType = "capture" | "update" | "none";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue