Skip to content

Commit

Permalink
refactor: Object.defineProperty -> defineProperty (#3629)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandernanberg authored Feb 9, 2023
1 parent c8f3b08 commit a932048
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/mobx/src/core/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import {
ACTION,
EMPTY_ARRAY,
die,
getDescriptor
getDescriptor,
defineProperty
} from "../internal"

// we don't use globalState for these in order to avoid possible issues with multiple
Expand Down Expand Up @@ -51,7 +52,7 @@ export function createAction(
res.isMobxAction = true
if (isFunctionNameConfigurable) {
tmpNameDescriptor.value = actionName
Object.defineProperty(res, "name", tmpNameDescriptor)
defineProperty(res, "name", tmpNameDescriptor)
}
return res
}
Expand Down

0 comments on commit a932048

Please sign in to comment.