Skip to content

Commit

Permalink
fix: make __hooks writable and configurable (#1520)
Browse files Browse the repository at this point in the history
  • Loading branch information
bertho-zero authored and daffl committed Oct 10, 2019
1 parent 6a56056 commit 1c6c374
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/commons/src/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ export function enableHooks (obj: any, methods: string[], types: string[]) {

// Add non-enumerable `__hooks` property to the object
Object.defineProperty(obj, '__hooks', {
value: hookData
configurable: true,
value: hookData,
writable: true
});

return Object.assign(obj, {
Expand Down

0 comments on commit 1c6c374

Please sign in to comment.