i18next-http-middleware 3.3.1 → 3.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -40,6 +40,7 @@ var getQuery = function getQuery(req) {
40
40
  if (req.searchParams) return req.searchParams;
41
41
  if (req.raw && req.raw.query) return req.raw.query;
42
42
  if (req.ctx && req.ctx.queryParams) return req.ctx.queryParams;
43
+ if (req.url && req.url.searchParams) return req.url.searchParams;
43
44
  var url = req.url || req.raw && req.raw.url;
44
45
  if (url && url.indexOf('?') < 0) return {};
45
46
  console.log('no possibility found to get query');
@@ -30,6 +30,7 @@ export var getQuery = function getQuery(req) {
30
30
  if (req.searchParams) return req.searchParams;
31
31
  if (req.raw && req.raw.query) return req.raw.query;
32
32
  if (req.ctx && req.ctx.queryParams) return req.ctx.queryParams;
33
+ if (req.url && req.url.searchParams) return req.url.searchParams;
33
34
  var url = req.url || req.raw && req.raw.url;
34
35
  if (url && url.indexOf('?') < 0) return {};
35
36
  console.log('no possibility found to get query');
@@ -35,6 +35,7 @@ export const getQuery = (req) => {
35
35
  if (req.searchParams) return req.searchParams
36
36
  if (req.raw && req.raw.query) return req.raw.query
37
37
  if (req.ctx && req.ctx.queryParams) return req.ctx.queryParams
38
+ if (req.url && req.url.searchParams) return req.url.searchParams
38
39
  const url = req.url || (req.raw && req.raw.url)
39
40
  if (url && url.indexOf('?') < 0) return {}
40
41
  console.log('no possibility found to get query')
package/licence CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2022 i18next
1
+ Copyright (c) 2023 i18next
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "i18next-http-middleware",
3
- "version": "3.3.1",
3
+ "version": "3.3.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./cjs/index.js",