Skip to content

Commit

Permalink
Actions are now configurable again, fixes #1477
Browse files Browse the repository at this point in the history
  • Loading branch information
mweststrate committed Apr 16, 2018
1 parent 3ae4444 commit 394c418
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/api/actiondecorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ export function namedActionDecorator(name: string) {
return {
value: createAction(name, descriptor.value),
enumerable: false,
configurable: false,
configurable: true, // See #1477
writable: true // for typescript, this must be writable, otherwise it cannot inherit :/ (see inheritable actions test)
}
}
// babel only: @action method = () => {}
const { initializer } = descriptor
return {
enumerable: false,
configurable: false,
writable: process.env.NODE_ENV !== "production", // See #1398
configurable: true, // See #1477
writable: true, // See #1398
initializer() {
// N.B: we can't immediately invoke initializer; this would be wrong
return createAction(name, initializer!.call(this))
Expand Down

0 comments on commit 394c418

Please sign in to comment.