examples: Use process.server instead

This commit is contained in:
Sébastien Chopin 2017-10-28 14:09:21 +02:00
parent 3d98a8be7f
commit 70cfc7fcc9
2 changed files with 3 additions and 3 deletions

View File

@ -7,9 +7,9 @@
<script>
export default {
asyncData ({ isStatic, isServer }) {
asyncData () {
return {
name: isStatic ? 'static' : (isServer ? 'server' : 'client')
name: process.static ? 'static' : (process.server ? 'server' : 'client')
}
}
}

View File

@ -1,3 +1,3 @@
export default function (context) {
context.userAgent = context.isServer ? context.req.headers['user-agent'] : navigator.userAgent
context.userAgent = process.server ? context.req.headers['user-agent'] : navigator.userAgent
}