fix: use Reflect API instead of Object.hasOwn (#7958)

This commit is contained in:
Marcel Mraz 2024-04-25 14:36:26 +01:00 committed by GitHub
parent a04676d423
commit 4d83d1c91e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -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";