summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAya Morisawa <AyaMorisawa4869@gmail.com>2018-12-09 03:45:07 +0900
committerGitHub <noreply@github.com>2018-12-09 03:45:07 +0900
commit01f60edb17ba5acbe83fba57feae83544a40ff97 (patch)
tree6c3837fdd51fe98e7d2ee489990b8ecaf44c1d9d /src
parentEliminate if-statement (#3562) (diff)
downloadmisskey-01f60edb17ba5acbe83fba57feae83544a40ff97.tar.gz
misskey-01f60edb17ba5acbe83fba57feae83544a40ff97.tar.bz2
misskey-01f60edb17ba5acbe83fba57feae83544a40ff97.zip
Eliminate duplicated condition on if-statement (#3563)
Diffstat (limited to 'src')
-rw-r--r--src/client/app/init.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/app/init.ts b/src/client/app/init.ts
index c9bcd56855..b282901525 100644
--- a/src/client/app/init.ts
+++ b/src/client/app/init.ts
@@ -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 shadowRight = '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) document.documentElement.style.setProperty('--shadowRight', shadowRight);
- if (os.store.state.settings.useShadow) document.documentElement.style.setProperty('--shadowLeft', shadowLeft);
+ if (os.store.state.settings.useShadow) {
+ document.documentElement.style.setProperty('--shadow', shadow);
+ document.documentElement.style.setProperty('--shadowRight', shadowRight);
+ document.documentElement.style.setProperty('--shadowLeft', shadowLeft);
+ }
os.store.watch(s => {
return s.settings.useShadow;
}, v => {