UNPKG

bmfe-vue2-base

Version:

BM 后台系统基础框架

20 lines (18 loc) 637 B
(function() { var local; if (typeof global !== 'undefined') local = global; else if (typeof window !== 'undefined' && window.document) local = window; else local = self; local.Promise.prototype['finally'] = function finallyPolyfill(callback) { var constructor = this.constructor; return this.then(function(value) { return constructor.resolve(callback()).then(function() { return value; }); }, function(reason) { return constructor.resolve(callback()).then(function() { throw reason; }); }); }; }());