fix: history.listen({location}) => history.listen(location)

This commit is contained in:
wanying.jwy 2020-08-30 17:54:44 +08:00
parent d85ca25fca
commit 25a6390e55
2 changed files with 2 additions and 2 deletions

View File

@ -243,7 +243,7 @@ export function useRouter(routerConfig) {
matchLocation(history.location);
}
unlisten = history.listen(({ location }) => {
unlisten = history.listen((location) => {
matchLocation(location);
});

View File

@ -288,7 +288,7 @@ export class SimulatorRendererContainer implements BuiltinSimulatorRenderer {
initialEntries: [initialEntry],
});
this.history = history;
history.listen(({ location }) => {
history.listen((location) => {
host.project.open(location.pathname.substr(1));
});
host.componentsConsumer.consume(async (componentsAsset) => {