From 0e75b8e4a0c7863271e5982794bec7a9e42a83cb Mon Sep 17 00:00:00 2001 From: "wanying.jwy" Date: Sun, 30 Aug 2020 18:50:29 +0800 Subject: [PATCH] fix: (location) => ({location}) --- packages/rax-simulator-renderer/src/rax-use-router.js | 2 +- packages/rax-simulator-renderer/src/renderer.ts | 2 +- packages/react-renderer/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/rax-simulator-renderer/src/rax-use-router.js b/packages/rax-simulator-renderer/src/rax-use-router.js index d11c79279..2bd395315 100644 --- a/packages/rax-simulator-renderer/src/rax-use-router.js +++ b/packages/rax-simulator-renderer/src/rax-use-router.js @@ -243,7 +243,7 @@ export function useRouter(routerConfig) { matchLocation(history.location); } - unlisten = history.listen((location) => { + unlisten = history.listen(({ location }) => { matchLocation(location); }); diff --git a/packages/rax-simulator-renderer/src/renderer.ts b/packages/rax-simulator-renderer/src/renderer.ts index df10fa7a0..d25429d1e 100644 --- a/packages/rax-simulator-renderer/src/renderer.ts +++ b/packages/rax-simulator-renderer/src/renderer.ts @@ -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) => { diff --git a/packages/react-renderer/package.json b/packages/react-renderer/package.json index 95e8edf30..ce53a7d4a 100644 --- a/packages/react-renderer/package.json +++ b/packages/react-renderer/package.json @@ -54,5 +54,5 @@ "publishConfig": { "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" }