From db7c45ee64c2c1dee082abc06fc751444344ec8d Mon Sep 17 00:00:00 2001 From: qiang Date: Wed, 5 Aug 2020 16:07:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20nvue=20=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=9C=A8=20iOS9=20=E7=99=BD=E5=B1=8F=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../packages/webpack-uni-nvue-loader/lib/main.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/main.js b/packages/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/main.js index bd56ba021..a43aa3ebd 100644 --- a/packages/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/main.js +++ b/packages/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/main.js @@ -61,13 +61,16 @@ module.exports = function (content, map) { import App from './${normalizePath(params.page)}.nvue?mpType=page' if (typeof Promise !== 'undefined' && !Promise.prototype.finally) { Promise.prototype.finally = function(callback) { - const promise = this.constructor - return this.then( - value => promise.resolve(callback()).then(() => value), - reason => promise.resolve(callback()).then(() => { + var promise = this.constructor + return this.then(function(value) { + return promise.resolve(callback()).then(function() { + return value + }) + }, function(reason) { + return promise.resolve(callback()).then(function() { throw reason }) - ) + }) } } App.mpType = 'page' -- GitLab