Eliminate duplicated condition on if-statement (#3563)

This commit is contained in:
Aya Morisawa 2018-12-09 03:45:07 +09:00 committed by GitHub
parent 15b11e59f4
commit 01f60edb17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -385,9 +385,11 @@ export default (callback: (launch: (router: VueRouter) => [Vue, MiOS]) => void,
const shadow = '0 3px 8px rgba(0, 0, 0, 0.2)'; const shadow = '0 3px 8px rgba(0, 0, 0, 0.2)';
const shadowRight = '4px 0 4px rgba(0, 0, 0, 0.1)'; const shadowRight = '4px 0 4px rgba(0, 0, 0, 0.1)';
const shadowLeft = '-4px 0 4px rgba(0, 0, 0, 0.1)'; const shadowLeft = '-4px 0 4px rgba(0, 0, 0, 0.1)';
if (os.store.state.settings.useShadow) document.documentElement.style.setProperty('--shadow', shadow); if (os.store.state.settings.useShadow) {
if (os.store.state.settings.useShadow) document.documentElement.style.setProperty('--shadowRight', shadowRight); document.documentElement.style.setProperty('--shadow', shadow);
if (os.store.state.settings.useShadow) document.documentElement.style.setProperty('--shadowLeft', shadowLeft); document.documentElement.style.setProperty('--shadowRight', shadowRight);
document.documentElement.style.setProperty('--shadowLeft', shadowLeft);
}
os.store.watch(s => { os.store.watch(s => {
return s.settings.useShadow; return s.settings.useShadow;
}, v => { }, v => {