1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-07 03:12:33 +01:00

Fix typo in code re. preferred theme colors

This commit is contained in:
Raymond Hill 2022-02-02 17:00:38 -05:00
parent e94f0ddcec
commit c61fe6a72b
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -72,8 +72,8 @@ DOMListFactory.root = document.querySelector(':root');
/******************************************************************************/
DOMListFactory.setTheme = function(theme, remove) {
if ( theme === 'auto' && typeof self.watchMedia === 'function' ) {
const mql = self.watchMedia('(prefers-color-scheme: dark)');
if ( theme === 'auto' && typeof self.matchMedia === 'function' ) {
const mql = self.matchMedia('(prefers-color-scheme: dark)');
theme = mql instanceof Object && mql.matches === true
? 'dark'
: '';