mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-23 11:56:00 +01:00
Merge pull request #1898 from dltmurphy/deprecated
Use addEventListener instead of addListener (deprecated)
This commit is contained in:
commit
c19d4f882d
@ -344,7 +344,7 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService
|
||||
}
|
||||
|
||||
onDefaultSystemThemeChange(callback: ((theme: 'light' | 'dark') => unknown)) {
|
||||
this.prefersColorSchemeDark.addListener(({ matches }) => {
|
||||
this.prefersColorSchemeDark.addEventListener('change', ({ matches }) => {
|
||||
callback(matches ? 'dark' : 'light');
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user