fix(core): update
This commit is contained in:
parent
3d6a421d25
commit
fda71ac3e6
@ -31,26 +31,27 @@ export class TagManager {
|
|||||||
this.baseLevel.addCompanyInfo(metaObjectArg.ldCompany);
|
this.baseLevel.addCompanyInfo(metaObjectArg.ldCompany);
|
||||||
}
|
}
|
||||||
await this.globalLevel.enable();
|
await this.globalLevel.enable();
|
||||||
await this.baseLevel.enable();
|
this.activeLevel = this.baseLevel;
|
||||||
|
await this.activeLevel.enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
public setSubPageLevel(metaObjectArg: interfaces.IMetaObject) {
|
public async setSubPageLevel(metaObjectArg: interfaces.IMetaObject) {
|
||||||
const subPageLevel = new TagLevel(this, 'subpage');
|
const subPageLevel = new TagLevel(this, 'subpage');
|
||||||
subPageLevel.title = metaObjectArg.title;
|
subPageLevel.title = metaObjectArg.title;
|
||||||
if (metaObjectArg.description) {
|
if (metaObjectArg.description) {
|
||||||
this.baseLevel.addTag(new MetaTag('description', metaObjectArg.description));
|
this.baseLevel.addTag(new MetaTag('description', metaObjectArg.description));
|
||||||
}
|
}
|
||||||
this.activeLevel.disable();
|
await this.activeLevel.disable();
|
||||||
this.activeLevel = subPageLevel;
|
this.activeLevel = subPageLevel;
|
||||||
this.activeLevel.enable();
|
await this.activeLevel.enable();
|
||||||
return subPageLevel;
|
return subPageLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public revertToBaseLevel() {
|
public async revertToBaseLevel() {
|
||||||
if (this.activeLevel !== this.baseLevel) {
|
if (this.activeLevel !== this.baseLevel) {
|
||||||
this.activeLevel.disable();
|
await this.activeLevel.disable();
|
||||||
this.activeLevel = this.baseLevel;
|
this.activeLevel = this.baseLevel;
|
||||||
this.activeLevel.enable();
|
await this.activeLevel.enable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,8 @@ export class WebSetup {
|
|||||||
* sets a subpage
|
* sets a subpage
|
||||||
* @param metaObjectArg
|
* @param metaObjectArg
|
||||||
*/
|
*/
|
||||||
public setSubLevel(metaObjectArg: interfaces.IMetaObject) {
|
public async setSubLevel(metaObjectArg: interfaces.IMetaObject) {
|
||||||
return this.tagManager.setSubPageLevel(metaObjectArg);
|
const subLevel = await this.tagManager.setSubPageLevel(metaObjectArg);
|
||||||
|
return subLevel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user