From 394c4185bffaca8ba16b1fb32b7846bc7974c17d Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Mon, 16 Apr 2018 19:37:49 +0200 Subject: [PATCH] Actions are now configurable again, fixes #1477 --- src/api/actiondecorator.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/actiondecorator.ts b/src/api/actiondecorator.ts index dc6418eea..bf6dc11e9 100644 --- a/src/api/actiondecorator.ts +++ b/src/api/actiondecorator.ts @@ -20,7 +20,7 @@ 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) } } @@ -28,8 +28,8 @@ export function namedActionDecorator(name: string) { 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))