mirror of
https://github.com/motajs/template.git
synced 2026-11-20 03:14:30 +08:00
fix: 主对象的 awake 问题
This commit is contained in:
1 parent
8af928b9fc
commit
9a64d42000
4 files changed
+4
-3
No files matched your search
@@ -144,7 +144,7 @@ export class ClientCore extends CoreState implements IClientCore {
|
||||
/**
|
||||
* 插件同步初始化
|
||||
*/
|
||||
protected awake(): void {
|
||||
awake(): void {
|
||||
super.awake();
|
||||
const result = this.orderedClientPlugins;
|
||||
if (result.cyclic.size > 0) {
|
||||
|
||||
@@ -152,7 +152,6 @@ export class CoreState
|
||||
deps.set(id, plugin.plugin.dataDeps);
|
||||
}
|
||||
this.orderedDataPlugins = orderPlugins(deps);
|
||||
this.awake();
|
||||
}
|
||||
|
||||
protected createController(
|
||||
@@ -205,7 +204,7 @@ export class CoreState
|
||||
/**
|
||||
* 插件同步初始化
|
||||
*/
|
||||
protected awake(): void {
|
||||
awake(): void {
|
||||
const result = this.orderedDataPlugins;
|
||||
if (result.cyclic.size > 0) {
|
||||
logger.error(76, [...result.cyclic].join(', '));
|
||||
|
||||
@@ -44,5 +44,6 @@ export function createClientCoreConfig(
|
||||
export function createClientCore(starter: ILoadTaskStarter): IClientCore {
|
||||
const config = createClientCoreConfig(starter);
|
||||
const state = new ClientCore(config);
|
||||
state.awake();
|
||||
return state;
|
||||
}
|
||||
@@ -28,5 +28,6 @@ export function createCoreStateConfig(
|
||||
export function createCoreState(starter: ILoadTaskStarter): ICoreState {
|
||||
const config = createCoreStateConfig(starter);
|
||||
const state = new CoreState(config);
|
||||
state.awake();
|
||||
return state;
|
||||
}
|
||||
Reference in new issue
Block a user