@ladjs/i18n
Advanced tools
Comparing version 8.0.1 to 8.0.2
@@ -200,3 +200,5 @@ const process = require('process'); | ||
return ctx.redirect( | ||
`/${ctx.state.locale}${ctx.pathWithoutLocale}${ | ||
`/${ctx.state.locale}${ | ||
ctx.pathWithoutLocale === '/' ? '' : ctx.pathWithoutLocale | ||
}${ | ||
isEmpty(ctx.query) ? '' : stringify(ctx.query, this.config.stringify) | ||
@@ -210,3 +212,5 @@ }` | ||
locales.map((locale) => { | ||
let url = `/${locale}${ctx.pathWithoutLocale}`; | ||
let url = `/${locale}${ | ||
ctx.pathWithoutLocale === '/' ? '' : ctx.pathWithoutLocale | ||
}`; | ||
// shallow clone it so we don't affect it | ||
@@ -213,0 +217,0 @@ const query = { ...ctx.query }; |
{ | ||
"name": "@ladjs/i18n", | ||
"description": "i18n wrapper and Koa middleware for Lad", | ||
"version": "8.0.1", | ||
"version": "8.0.2", | ||
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)", | ||
@@ -6,0 +6,0 @@ "bugs": { |
23287
319