chore: ignore error handling for command wrapping (#14383)

This commit is contained in:
sauravdas1997 2025-04-09 04:13:52 +05:30 committed by GitHub
parent 802cd14c3f
commit 834ae62d8d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -259,7 +259,7 @@ export function o11yClassErrorHandler<T extends ClassType>(errorClass: T): T {
Object.getOwnPropertyNames(prototype).forEach((methodName) => {
const method = prototype[methodName]
if (typeof method === 'function' && methodName !== 'constructor') {
if (typeof method === 'function' && methodName !== 'constructor' && methodName !== 'commandWrapper') {
// In order to preserve this context, need to define like this
Object.defineProperty(prototype, methodName, {
writable: true,