Fix Deprecation Issue

This commit is contained in:
Danny Murphy 2021-06-15 10:43:56 +01:00
parent 75e47f2f62
commit 6cdadc6bdf
1 changed files with 1 additions and 1 deletions

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