From bcb6dcfacf059750c664da423f7de7daaa7fd1b0 Mon Sep 17 00:00:00 2001 From: Grzegorz Leoniec Date: Sun, 24 Feb 2019 15:26:25 +0100 Subject: [PATCH] Added IntersectionObserver polyfill and fixed linting on login --- nuxt.config.js | 9 ++++++++- pages/login.vue | 10 +++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/nuxt.config.js b/nuxt.config.js index d6344ce80..664a720be 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -43,7 +43,14 @@ module.exports = { { name: 'viewport', content: 'width=device-width, initial-scale=1' }, { hid: 'description', name: 'description', content: pkg.description } ], - link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }] + link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }], + script: [ + { + src: + 'https://polyfill.io/v3/polyfill.min.js?features=IntersectionObserver', + body: true + } + ] }, /* diff --git a/pages/login.vue b/pages/login.vue index 36829e0ee..846191c40 100644 --- a/pages/login.vue +++ b/pages/login.vue @@ -113,16 +113,16 @@ export default { } } }, - asyncData({ store, redirect }) { - if (store.getters['auth/isLoggedIn']) { - redirect('/') - } - }, computed: { pending() { return this.$store.getters['auth/pending'] } }, + asyncData({ store, redirect }) { + if (store.getters['auth/isLoggedIn']) { + redirect('/') + } + }, mounted() { setTimeout(() => { // NOTE: quick fix for jumping flexbox implementation