@quintype/framework 7.27.1 → 7.27.2-amp-infinite-scroll-errors.0

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.27.1",
3
+ "version": "7.27.2-amp-infinite-scroll-errors.0",
4
4
  "description": "Libraries to help build Quintype Node.js apps",
5
5
  "main": "index.js",
6
6
  "engines": {
@@ -6,6 +6,8 @@ const cloneDeep = require("lodash/cloneDeep");
6
6
 
7
7
  // eslint-disable-next-line consistent-return
8
8
  async function storyPageInfiniteScrollHandler(req, res, next, { client, config, ...rest }) {
9
+ if (!req.query["story-id"]) return res.status(400).send(`Query param "story-id" missing`);
10
+
9
11
  const ampConfig = await config.memoizeAsync("amp-config", async () => await AmpConfig.getAmpConfig(client));
10
12
  const opts = cloneDeep(rest);
11
13
  const infiniteScrollSource = get(opts, ["featureConfig", "infiniteScroll", "source"], "collection");