1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-27 12:36:14 +01:00

Fix Deprecation Issue

This commit is contained in:
Danny Murphy 2021-06-15 10:43:56 +01:00
parent 75e47f2f62
commit 6cdadc6bdf

View File

@ -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');
});
}