improve and clean

This commit is contained in:
Arrowana 2018-01-15 20:09:40 +11:00
parent 8eb7f58988
commit 4795901e12
2 changed files with 1 additions and 2 deletions

View file

@ -67,7 +67,7 @@ function isNight() {
const startNightMoment = moment('19:00', 'HH:mm');
const endNightTime = moment('8:00', 'HH:mm');
const momentNow = moment();
return momentNow.isAfter(endNightTime) && momentNow.isBefore(startNightMoment) ? false : true;
return !(momentNow.isAfter(endNightTime) && momentNow.isBefore(startNightMoment));
}
export function doUpdateIsNight() {

View file

@ -1,6 +1,5 @@
import * as SETTINGS from 'constants/settings';
import { createSelector } from 'reselect';
import moment from 'moment';
const selectState = state => state.settings || {};