Skip to content

Commit 3bf170d

Browse files
Muzaffer AydinMuzaffer Aydin
authored andcommitted
fix(wizard): replace .apply(this) with .bind(this) in constructor
1 parent 746cfbd commit 3bf170d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/core/src/shared/wizards/wizard.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,10 @@ export class Wizard<TState extends Partial<Record<keyof TState, unknown>>> {
146146
this._ready = !this.init
147147

148148
if (typeof this.init === 'function') {
149-
// eslint-disable-next-line @typescript-eslint/unbound-method
150-
const _init = this.init
149+
const _init = this.init.bind(this)
151150
this.init = () => {
152151
this._ready = true
153-
return _init.apply(this)
152+
return _init()
154153
}
155154
}
156155
}

0 commit comments

Comments
 (0)