diff --git a/lib/util/decorator/index.ts b/lib/util/decorator/index.ts index 87bd71aa3c0e85..2a9ef484da9a06 100644 --- a/lib/util/decorator/index.ts +++ b/lib/util/decorator/index.ts @@ -38,11 +38,11 @@ export function decorate(fn: Handler): Decorator { const result: Decorator = ( target, key, - /* TODO: Can descriptor be undefined ? */ - descriptor = Object.getOwnPropertyDescriptor(target, key) ?? { + descriptor = { enumerable: true, configurable: true, writable: true, + ...Object.getOwnPropertyDescriptor(target, key), } ) => { const { value } = descriptor;