Static GitHub Issues

[656] error for middleware

prev: webpack@2.4.1 breaks nuxt
next: Router middleware doesnt commit to store on SSR
export default function(context) {
    var bs = require('bowser');
    var userAgent = context.isServer ? context.req.headers['user-agent'] :
        navigator.userAgent;
    var bowser = bs._detect(userAgent);
    if (bowser.msie && bowser.version < 9) {
        return context.redirect('/unsuport')
    } else {
        // do nothing else,  i think it should be continued
    }
}

such as the upon code , i think if i visit the browser which is not ie9 below, it should do nothing in middleware and going on response me the page , but the page keeps always loading , cant stop.

i did not find any case in nuxt project, am i wrong? ps. i use nuxt in koa

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c566">#c566</a>)</em></sub></div>