Skip to content

Commit

Permalink
fix(overmind): make sure getters are managed in initial state
Browse files Browse the repository at this point in the history
  • Loading branch information
christianalfoni committed Jan 14, 2019
1 parent 1662347 commit 52f8e22
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/node_modules/overmind/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,9 @@ export class Overmind<Config extends Configuration> implements Configuration {
} else if (typeof value === 'function') {
aggr[key] = new Derived(value)
} else {
aggr[key] = value
var originalDescriptor = Object.getOwnPropertyDescriptor(state, key)

Object.defineProperty(aggr, key, originalDescriptor as any)
}

return aggr
Expand Down

0 comments on commit 52f8e22

Please sign in to comment.