1
1
mirror of https://github.com/aelve/guide.git synced 2024-12-23 21:02:13 +03:00

got rid of useless constants

This commit is contained in:
zeot 2019-01-04 22:34:16 +04:00
parent e61142c0b0
commit 053e9731ab
3 changed files with 1 additions and 15 deletions

View File

@ -8,21 +8,13 @@ import { createApp } from './app'
const { app, router, store } = createApp()
const STATE_KEY = '__INITIAL_STATE__'
const SSR_ENABLED = window['__SSR_IS_ON__']
if (window[STATE_KEY]) {
store.replaceState(window[STATE_KEY])
}
if (!SSR_ENABLED) {
registerBeforeResolve()
}
router.onReady(() => {
// TODO get rid of SSR_ENABLED constant
if (SSR_ENABLED) {
registerBeforeResolve()
}
registerBeforeResolve()
app.$mount('#app')
})

View File

@ -9,9 +9,6 @@
<head>
<meta charset="UTF-8">
<title><%= htmlWebpackPlugin.options.title %></title>
<script>
window.__SSR_IS_ON__ = false
</script>
</head>
<body>

View File

@ -9,9 +9,6 @@
<head>
<meta charset="UTF-8">
<title>{{title}}</title>
<script>
window.__SSR_IS_ON__ = true
</script>
</head>
<body>