From 168ec281aaa6005498dd73de6f64739d67d66b1d Mon Sep 17 00:00:00 2001 From: roymondchen Date: Mon, 6 Nov 2023 11:35:44 +0800 Subject: [PATCH] =?UTF-8?q?fix(core):=20=E8=AE=BE=E7=BD=AEpage=E6=97=B6?= =?UTF-8?q?=E6=9F=A5=E6=89=BE=E5=8E=9Fpage=E5=85=BC=E5=AE=B9=E6=95=B0?= =?UTF-8?q?=E5=AD=97id=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix #547 --- packages/core/src/App.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/App.ts b/packages/core/src/App.ts index d29cce5f..e2235177 100644 --- a/packages/core/src/App.ts +++ b/packages/core/src/App.ts @@ -195,7 +195,7 @@ class App extends EventEmitter implements AppCore { } public setPage(id?: Id) { - const pageConfig = this.dsl?.items.find((page) => page.id === id); + const pageConfig = this.dsl?.items.find((page) => `${page.id}` === `${id}`); if (!pageConfig) { if (this.page) { @@ -234,7 +234,7 @@ class App extends EventEmitter implements AppCore { */ public getPage(id?: Id) { if (!id) return this.page; - if (this.page?.data.id === id) { + if (this.page && `${this.page.data.id}` === `${id}`) { return this.page; } }