mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-22 14:05:12 +00:00
fixed querySelector that would grab favicon
This commit is contained in:
parent
47d1477ac4
commit
975b6b3dd0
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ class FavIconDot {
|
||||||
|
|
||||||
private async getOrMakeFaviconElement() : Promise<HTMLLinkElement> {
|
private async getOrMakeFaviconElement() : Promise<HTMLLinkElement> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const favicon = document.querySelector<HTMLLinkElement>('link[rel$=icon]') ?? this._createFaviconElem();
|
const favicon = (document.querySelector('link[rel=icon]') ?? this._createFaviconElem()) as HTMLLinkElement;
|
||||||
favicon.addEventListener('load', () => {
|
favicon.addEventListener('load', () => {
|
||||||
resolve(favicon);
|
resolve(favicon);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue