1
0
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:
Thomas Rittson 2021-06-15 21:00:27 -07:00 committed by GitHub
commit c19d4f882d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -344,7 +344,7 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService
} }
onDefaultSystemThemeChange(callback: ((theme: 'light' | 'dark') => unknown)) { onDefaultSystemThemeChange(callback: ((theme: 'light' | 'dark') => unknown)) {
this.prefersColorSchemeDark.addListener(({ matches }) => { this.prefersColorSchemeDark.addEventListener('change', ({ matches }) => {
callback(matches ? 'dark' : 'light'); callback(matches ? 'dark' : 'light');
}); });
} }