fix: 修复无法 remove currentDocument

This commit is contained in:
力皓 2021-04-20 14:18:36 +08:00
parent b75168347b
commit 4157aa0443

View File

@ -243,7 +243,8 @@ export class SimulatorRendererContainer implements BuiltinSimulatorRenderer {
}); });
this.history = history; this.history = history;
history.listen((location, action) => { history.listen((location, action) => {
host.project.open(location.pathname.substr(1)); const docId = location.pathname.substr(1);
docId && host.project.open(docId);
}); });
host.componentsConsumer.consume(async (componentsAsset) => { host.componentsConsumer.consume(async (componentsAsset) => {
if (componentsAsset) { if (componentsAsset) {