diff --git a/src/modules/esl-utils/decorators/bind.ts b/src/modules/esl-utils/decorators/bind.ts index c1c8ec6ec..4fc0a4fd9 100644 --- a/src/modules/esl-utils/decorators/bind.ts +++ b/src/modules/esl-utils/decorators/bind.ts @@ -17,7 +17,8 @@ export function bind(target: object, get() { // Accessing via prototype returns original function - if (this === target) { + // If the constructor property is in the context then it's not an instance + if (!this || this === target || Object.hasOwnProperty.call(this, 'constructor')) { return fn; }