mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
parent
6fda0e6e44
commit
168ec281aa
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user