提交 382cddc2 编写于 作者: Q qiang

Merge branch 'dev' into alpha

...@@ -61,13 +61,16 @@ module.exports = function (content, map) { ...@@ -61,13 +61,16 @@ module.exports = function (content, map) {
import App from './${normalizePath(params.page)}.nvue?mpType=page' import App from './${normalizePath(params.page)}.nvue?mpType=page'
if (typeof Promise !== 'undefined' && !Promise.prototype.finally) { if (typeof Promise !== 'undefined' && !Promise.prototype.finally) {
Promise.prototype.finally = function(callback) { Promise.prototype.finally = function(callback) {
const promise = this.constructor var promise = this.constructor
return this.then( return this.then(function(value) {
value => promise.resolve(callback()).then(() => value), return promise.resolve(callback()).then(function() {
reason => promise.resolve(callback()).then(() => { return value
})
}, function(reason) {
return promise.resolve(callback()).then(function() {
throw reason throw reason
}) })
) })
} }
} }
App.mpType = 'page' App.mpType = 'page'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册