if (typeof Promise !== 'undefined' && !Promise.prototype.finally) {
|
Promise.prototype.finally = function (callback) {
|
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
|
})
|
})
|
}
|
}
|
if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
|
const global = uni.requireGlobal()
|
ArrayBuffer = global.ArrayBuffer
|
Int8Array = global.Int8Array
|
Uint8Array = global.Uint8Array
|
Uint8ClampedArray = global.Uint8ClampedArray
|
Int16Array = global.Int16Array
|
Uint16Array = global.Uint16Array
|
Int32Array = global.Int32Array
|
Uint32Array = global.Uint32Array
|
Float32Array = global.Float32Array
|
Float64Array = global.Float64Array
|
BigInt64Array = global.BigInt64Array
|
BigUint64Array = global.BigUint64Array
|
}
|