diff --git a/docs/tutorial/mojave-dark-mode-guide.md b/docs/tutorial/mojave-dark-mode-guide.md index c1ca37c0cf5d..bc48a0847d75 100644 --- a/docs/tutorial/mojave-dark-mode-guide.md +++ b/docs/tutorial/mojave-dark-mode-guide.md @@ -21,12 +21,12 @@ If your app has its own dark mode you should toggle it on and off in sync with t this by listening for the theme changed event on Electron's `systemPreferences` module. E.g. ```js -const { systemPreferences } = require('electron') +const { nativeTheme } = require('electron') systemPreferences.subscribeNotification( 'AppleInterfaceThemeChangedNotification', function theThemeHasChanged () { - updateMyAppTheme(systemPreferences.isDarkMode()) + updateMyAppTheme(nativeTheme.shouldUseDarkColors) } ) ```