From 1c6c3742ecf1cb813be56074da89e6736d03ffe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Berthommier?= Date: Thu, 10 Oct 2019 03:40:12 +0200 Subject: [PATCH] fix: make __hooks writable and configurable (#1520) --- packages/commons/src/hooks.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/commons/src/hooks.ts b/packages/commons/src/hooks.ts index f8d3882db2..9852c01422 100644 --- a/packages/commons/src/hooks.ts +++ b/packages/commons/src/hooks.ts @@ -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, {