Fix actions not being constructible

This commit is contained in:
thepaperpilot 2023-05-01 08:20:30 -05:00
parent 8dd2cbe466
commit dbdcf19b6d

View file

@ -244,8 +244,9 @@ export function createAction<T extends ActionOptions>(
decorator.postConstruct?.(action); decorator.postConstruct?.(action);
} }
const decoratedProps = decorators.reduce((current, next) => const decoratedProps = decorators.reduce(
Object.assign(current, next.getGatheredProps?.(action)) (current, next) => Object.assign(current, next.getGatheredProps?.(action)),
{}
); );
action[GatherProps] = function (this: GenericAction) { action[GatherProps] = function (this: GenericAction) {
const { const {