mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-25 09:03:12 +03:00
🐛 Fixed need to click Night Shift toggle 3 times in certain circumstances (#965)
closes TryGhost/Ghost#9471 - added check for undefined value - fixed the condition in feature.js _setAdminTheme
This commit is contained in:
parent
bee7e6e1bf
commit
88af30f855
@ -119,7 +119,11 @@ export default Service.extend({
|
||||
},
|
||||
|
||||
_setAdminTheme(enabled) {
|
||||
let nightShift = enabled || this.get('nightShift');
|
||||
let nightShift = enabled;
|
||||
|
||||
if (typeof nightShift === 'undefined') {
|
||||
nightShift = enabled || this.get('nightShift');
|
||||
}
|
||||
|
||||
return this.get('lazyLoader').loadStyle('dark', 'assets/ghost-dark.css', true).then(() => {
|
||||
$('link[title=dark]').prop('disabled', !nightShift);
|
||||
|
Loading…
Reference in New Issue
Block a user