Apply strictNullChecks to src/async-components/* (#10251

* Apply strictNullChecks to src/async-components/*

* Iterate
This commit is contained in:
Michael Telatyński
2023-02-28 10:51:27 +00:00
committed by GitHub
parent 629e5cb01f
commit 8ad21e6492
7 changed files with 57 additions and 43 deletions
+2 -1
View File
@@ -70,7 +70,8 @@ export function selectText(target: Element): void {
* In certain browsers it may only work if triggered by a user action or may ask user for permissions
* @param ref pointer to the node to copy
*/
export function copyNode(ref: Element): boolean {
export function copyNode(ref?: Element | null): boolean {
if (!ref) return false;
selectText(ref);
return document.execCommand("copy");
}