check if body contains helper element before removing it
This commit is contained in:
parent
6bc8881a8f
commit
d9d8dcc7f4
@ -54,7 +54,7 @@ export class HelpModeService {
|
||||
}
|
||||
|
||||
getDocsLink(elementName: string): string {
|
||||
return `${this._manualBaseURL}${this._docs[elementName][this._translateService.currentLang]}`;
|
||||
return this._docs[elementName] ? `${this._manualBaseURL}${this._docs[elementName][this._translateService.currentLang]}` : '';
|
||||
}
|
||||
|
||||
activateHelpMode(): void {
|
||||
@ -112,7 +112,9 @@ export class HelpModeService {
|
||||
|
||||
private _disableHelperElements() {
|
||||
Object.values(this._helperElements).forEach(({ helperElement }) => {
|
||||
document.body.removeChild(helperElement)
|
||||
if (document.body.contains(helperElement)) {
|
||||
document.body.removeChild(helperElement);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -3,5 +3,4 @@ import { ActionConfig } from './action-config.model';
|
||||
|
||||
export interface ButtonConfig extends ActionConfig {
|
||||
readonly type?: IconButtonType;
|
||||
readonly helpModeKey?: string;
|
||||
}
|
||||
|
||||
@ -44,6 +44,7 @@
|
||||
[icon]="config.icon"
|
||||
[tooltip]="config.label"
|
||||
tooltipPosition="below"
|
||||
[iqserHelpMode]="config.helpModeKey"
|
||||
></iqser-circle-button>
|
||||
</ng-container>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user