fix: 如果先 updateEnv 会让 env 默认配置丢失

This commit is contained in:
2betop 2022-06-24 18:45:51 +08:00
parent 9b973de831
commit b4a15628d2

View File

@ -370,7 +370,13 @@ export function updateEnv(options: Partial<RenderOptions>, session = 'global') {
let store = stores[options.session || session];
if (!store) {
store = RendererStore.create({}, options);
store = RendererStore.create(
{},
{
...defaultOptions,
...options
}
);
stores[options.session || session] = store;
} else {
const env = getEnv(store);