@quintype/framework 7.26.2-amp-infinite-scroll-errors.0 → 7.26.2-amp-infinite-scroll-errors.1
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quintype/framework",
|
|
3
|
-
"version": "7.26.2-amp-infinite-scroll-errors.
|
|
3
|
+
"version": "7.26.2-amp-infinite-scroll-errors.1",
|
|
4
4
|
"description": "Libraries to help build Quintype Node.js apps",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"engines": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"npm": "^8.5.0"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
|
-
"prepublishOnly": "./bin-dev-scripts/standard-version-release.sh",
|
|
11
|
+
"prepublishOnly": "npm test && ./bin-dev-scripts/standard-version-release.sh",
|
|
12
12
|
"test": "NODE_ENV=test npx mocha --recursive --require ./test/babel",
|
|
13
13
|
"watch-test": "NODE_ENV=test npx mocha --recursive --watch --require ./test/babel",
|
|
14
14
|
"coverage": "nyc --all npm test",
|
|
@@ -13,10 +13,10 @@ function isUrl(url) {
|
|
|
13
13
|
function processRedirects(req, res, next, sourceUrlArray, urls) {
|
|
14
14
|
const query = url.parse(req.url, true) || {};
|
|
15
15
|
const search = query.search || "";
|
|
16
|
-
if (!urls || !sourceUrlArray
|
|
16
|
+
if (!urls || !sourceUrlArray) return;
|
|
17
17
|
|
|
18
18
|
sourceUrlArray.some((sourceUrl) => {
|
|
19
|
-
if (urls[sourceUrl]) {
|
|
19
|
+
if (typeof urls === "object" && urls[sourceUrl]) {
|
|
20
20
|
try {
|
|
21
21
|
const destinationPath = urls[sourceUrl].destinationUrl;
|
|
22
22
|
const extractedSourceUrl = match(sourceUrl, {
|