mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 01:21:58 +00:00
Merge branch 'fix-Promise.allSettled' into 'release/1.0.0'
Fix promise.all settled See merge request !1060540
This commit is contained in:
commit
ff647f6f26
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-datasource-engine",
|
||||
"version": "1.0.22",
|
||||
"version": "1.0.23-alpha.1",
|
||||
"description": "DataSource Engine for lowcode",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
@ -19,10 +19,12 @@
|
||||
"dependencies": {
|
||||
"@ali/lowcode-datasource-types": "^1.0.21",
|
||||
"@ali/lowcode-types": "^1.0.20",
|
||||
"promise.allsettled": "^1.0.2",
|
||||
"typescript": "^3.9.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ava/babel": "^1.0.1",
|
||||
"@types/promise.allsettled": "^1.0.3",
|
||||
"@types/sinon": "^9.0.5",
|
||||
"ava": "3.11.1",
|
||||
"get-port": "^5.1.1",
|
||||
|
||||
@ -1,4 +1,8 @@
|
||||
import { DataSourceMap, RuntimeDataSource, RuntimeDataSourceConfig } from '@ali/lowcode-types';
|
||||
import allSettled from 'promise.allsettled';
|
||||
|
||||
// 兼容低版本的浏览器
|
||||
const promiseSettled = typeof Promise.allSettled === 'function' ? Promise.allSettled : allSettled;
|
||||
|
||||
export const reloadDataSourceFactory = (
|
||||
dataSource: RuntimeDataSource,
|
||||
@ -56,7 +60,7 @@ export const reloadDataSourceFactory = (
|
||||
}
|
||||
}
|
||||
|
||||
await Promise.allSettled(allAsyncLoadings);
|
||||
await promiseSettled(allAsyncLoadings);
|
||||
|
||||
// 所有的初始化请求都结束之后,调用钩子函数
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user