From 53bd3bd2ff2a9ffbb2bef152d8d172595a80b1a9 Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Mon, 13 May 2019 16:58:11 +0800 Subject: [PATCH] fix #380 --- src/core/helpers/promise.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/helpers/promise.js b/src/core/helpers/promise.js index 59f1087f..f2374017 100644 --- a/src/core/helpers/promise.js +++ b/src/core/helpers/promise.js @@ -57,7 +57,7 @@ export function promisify (name, api) { fail: reject }), ...params) /* eslint-disable no-extend-native */ - try { + if (!Promise.prototype.finally) { Promise.prototype.finally = function (callback) { const promise = this.constructor return this.then( @@ -67,7 +67,7 @@ export function promisify (name, api) { }) ) } - } catch (e) {} + } })) } } -- GitLab