From c61fe6a72b8137cc77d2e5ad2908768111669c56 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Wed, 2 Feb 2022 17:00:38 -0500 Subject: [PATCH] Fix typo in code re. preferred theme colors --- src/js/udom.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/udom.js b/src/js/udom.js index 9c8df977c..5fd00d25a 100644 --- a/src/js/udom.js +++ b/src/js/udom.js @@ -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' : '';