mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-05-06 10:35:15 +08:00
parent
6fda0e6e44
commit
168ec281aa
@ -195,7 +195,7 @@ class App extends EventEmitter implements AppCore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public setPage(id?: Id) {
|
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 (!pageConfig) {
|
||||||
if (this.page) {
|
if (this.page) {
|
||||||
@ -234,7 +234,7 @@ class App extends EventEmitter implements AppCore {
|
|||||||
*/
|
*/
|
||||||
public getPage(id?: Id) {
|
public getPage(id?: Id) {
|
||||||
if (!id) return this.page;
|
if (!id) return this.page;
|
||||||
if (this.page?.data.id === id) {
|
if (this.page && `${this.page.data.id}` === `${id}`) {
|
||||||
return this.page;
|
return this.page;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user