From b85d0e5ee3ed71cfc59c3f3cecbd137772c74f33 Mon Sep 17 00:00:00 2001 From: Martin Guillon Date: Thu, 12 Nov 2020 21:03:33 +0100 Subject: [PATCH] fix: rollback animation lint which would break promise context --- packages/core/ui/animation/animation-common.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/core/ui/animation/animation-common.ts b/packages/core/ui/animation/animation-common.ts index ae8b08e27..0771f3654 100644 --- a/packages/core/ui/animation/animation-common.ts +++ b/packages/core/ui/animation/animation-common.ts @@ -100,15 +100,17 @@ export abstract class AnimationBase implements AnimationBaseDefinition { _this.cancel(); }; const _then = promise.then; - promise.then = function (...args) { - const r = _then(...args); + promise.then = function () { + // eslint-disable-next-line prefer-rest-params + const r = _then.apply(promise, arguments); _this.fixupAnimationPromise(r); return r; }; const _catch = promise.catch; - promise.catch = function (...args) { - const r = _catch(...args); + promise.catch = function () { + // eslint-disable-next-line prefer-rest-params + const r = _catch.apply(promise, arguments); _this.fixupAnimationPromise(r); return r;