Skip to content

Commit

Permalink
Fix ci build
Browse files Browse the repository at this point in the history
  • Loading branch information
eelkevdbos committed Oct 17, 2024
1 parent 02aec2a commit 7c820fc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions build.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import dts from 'bun-plugin-dts'
import dts from 'bun-plugin-dts';

await Bun.build({
entrypoints: ['./src/index.ts'],
Expand All @@ -10,4 +10,4 @@ await Bun.build({
plugins: [
dts(),
],
})
});
Binary file modified bun.lockb
Binary file not shown.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
"license": "MIT",
"devDependencies": {
"i18next": "^23.5.1",
"bun-plugin-dts": "^0.1.0",
"bun-types": "latest",
"elysia": "^1.0.5",
"bun-plugin-dts": "^0.3.0",
"bun-types": "^1.1.30",
"elysia": "^1.1.22",
"prettier": "^3.0.3",
"typescript": "^5.2.2"
},
"peerDependencies": {
"elysia": ">= 0.7.1",
"elysia": ">= 1.0.1",
"i18next": ">= 23.5.1"
}
}
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function newLanguageDetector(opts: LanguageDetectorOptions): LanguageDete

const cookie = set.cookie ? set.cookie[opts.cookieName] : null
if (cookie && cookie.value) {
return cookie.value
return cookie.value as string
}

if (params && opts.pathParamName in params) {
Expand Down Expand Up @@ -82,7 +82,7 @@ export const i18next = (userOptions: Partial<I18NextPluginOptions>) => {
})
.onBeforeHandle({ as: "global" }, async ctx => {
const lng = await options.detectLanguage(ctx)
if (lng) {
if (typeof lng === 'string') {
await _instance.changeLanguage(lng)
}
})
Expand Down

0 comments on commit 7c820fc

Please sign in to comment.