Fix Deprecation Issue
This commit is contained in:
parent
75e47f2f62
commit
6cdadc6bdf
|
@ -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