From 1aa112156375eb1189e89f6637b9b2b2c9124e0e Mon Sep 17 00:00:00 2001 From: Jamie Birch <14055146+shirakaba@users.noreply.github.com> Date: Tue, 13 Mar 2018 16:11:24 +0000 Subject: [PATCH] polyfill if Promise.prototype.finally() is undefined. --- lib/es6-promise/polyfill.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/es6-promise/polyfill.js b/lib/es6-promise/polyfill.js index 30db73c..f4ffd8d 100644 --- a/lib/es6-promise/polyfill.js +++ b/lib/es6-promise/polyfill.js @@ -27,7 +27,9 @@ export default function polyfill() { } if (promiseToString === '[object Promise]' && !P.cast){ - return; + if (typeof P.prototype.finally !== "undefined"){ + return; + } } }