fix: (location) => ({location})

This commit is contained in:
wanying.jwy 2020-08-30 18:50:29 +08:00
parent 3b4f6cd43c
commit 0e75b8e4a0
3 changed files with 3 additions and 3 deletions

View File

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

View File

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

View File

@ -54,5 +54,5 @@
"publishConfig": { "publishConfig": {
"registry": "http://registry.npm.alibaba-inc.com" "registry": "http://registry.npm.alibaba-inc.com"
}, },
"homepage": "https:/unpkg.alibaba-inc.com/@ali/lowcode-react-renderer@0.8.18/build/index.html" "homepage": "https://unpkg.alibaba-inc.com/@ali/lowcode-react-renderer@0.8.18/build/index.html"
} }