mirror of
https://github.com/element-hq/element-web
synced 2024-11-23 09:46:09 +03:00
Add types for styleElements object
This commit is contained in:
parent
54b79c7667
commit
be8e44e17e
1 changed files with 2 additions and 2 deletions
|
@ -237,8 +237,8 @@ export async function setTheme(theme?: string): Promise<void> {
|
|||
|
||||
// look for the stylesheet elements.
|
||||
// styleElements is a map from style name to HTMLLinkElement.
|
||||
const styleElements = Object.create(null);
|
||||
const themes = Array.from(document.querySelectorAll('[data-mx-theme]'));
|
||||
const styleElements: Record<string, HTMLLinkElement> = Object.create(null);
|
||||
const themes = Array.from(document.querySelectorAll<HTMLLinkElement>('[data-mx-theme]'));
|
||||
themes.forEach(theme => {
|
||||
styleElements[theme.attributes['data-mx-theme'].value.toLowerCase()] = theme;
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue