diff options
Diffstat (limited to 'src/pybind/mgr/dashboard/frontend/src/app/shared/components/copy2clipboard-button/copy2clipboard-button.component.ts')
-rw-r--r-- | src/pybind/mgr/dashboard/frontend/src/app/shared/components/copy2clipboard-button/copy2clipboard-button.component.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/copy2clipboard-button/copy2clipboard-button.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/copy2clipboard-button/copy2clipboard-button.component.ts index 80c7acbf2..b6b8ca77e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/copy2clipboard-button/copy2clipboard-button.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/copy2clipboard-button/copy2clipboard-button.component.ts @@ -26,7 +26,7 @@ export class Copy2ClipboardButtonComponent { private getText(): string { const element = document.getElementById(this.source) as HTMLInputElement; - return element.value; + return element?.value || element?.textContent; } @HostListener('click') |