From dde047687a8a0d5fc442ebe2a851471349515c53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Mon, 30 Mar 2020 13:09:08 +0200 Subject: [PATCH] fix bug --- packages/core/src/utils/magicMethods.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/core/src/utils/magicMethods.ts b/packages/core/src/utils/magicMethods.ts index e9bcb5d6..4f1d37a4 100644 --- a/packages/core/src/utils/magicMethods.ts +++ b/packages/core/src/utils/magicMethods.ts @@ -12,8 +12,10 @@ export default function magicMethods(clazz: any) { return } - const exists = name in target || name.startsWith('_') - + const exists = name in target + || name.startsWith('_') + || ['then', 'catch'].includes(name) + if (exists) { return target[name] } else {