Skip to content

Commit

Permalink
return action initializer instead of using addInitializer
Browse files Browse the repository at this point in the history
  • Loading branch information
phiresky committed Jan 19, 2024
1 parent df7e1eb commit c55128f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/mobx/src/types/actionannotation.ts
Expand Up @@ -75,10 +75,7 @@ function decorate_20223_(this: Annotation, mthd, context: DecoratorContext) {

// Backwards/Legacy behavior, expects makeObservable(this)
if (kind == "field") {
addInitializer(function () {
storeAnnotation(this, name, ann)
})
return
return _createAction
}

if (kind == "method") {
Expand Down

0 comments on commit c55128f

Please sign in to comment.