@financial-times/dotcom-server-handlebars 8.1.0 → 8.2.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.
@@ -7,6 +7,9 @@ function slice(...args) {
7
7
  const options = args.pop();
8
8
  const offset = parseInt(options.hash.offset, 10) || 0;
9
9
  const limit = parseInt(options.hash.limit, 10) || 1;
10
+ if (!args[0]) {
11
+ return '';
12
+ }
10
13
  const slicedItems = Array.from(args[0]).slice(offset, offset + limit);
11
14
  let contents = '';
12
15
  slicedItems.forEach((item) => {
@@ -577,7 +577,7 @@
577
577
  "affectsGlobalScope": false
578
578
  },
579
579
  "../src/helpers/slice.ts": {
580
- "version": "379fd37e62d5b707e3809eab45041a7cf3b51cb902f731af7d0a98466e445ac6",
580
+ "version": "aafcae6804c60f010347abef848e373928bd9d096c0f4e3b379380e29cdc5903",
581
581
  "signature": "c452e2dc95d301a39a0a77e5665e3773882b5e74a823e33c3cdc91b062fa0542",
582
582
  "affectsGlobalScope": false
583
583
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@financial-times/dotcom-server-handlebars",
3
- "version": "8.1.0",
3
+ "version": "8.2.1",
4
4
  "description": "",
5
5
  "main": "dist/node/index.js",
6
6
  "types": "src/index.ts",
@@ -10,6 +10,10 @@ export default function slice(...args) {
10
10
  const offset = parseInt(options.hash.offset, 10) || 0
11
11
  const limit = parseInt(options.hash.limit, 10) || 1
12
12
 
13
+ if (!args[0]) {
14
+ return ''
15
+ }
16
+
13
17
  const slicedItems = Array.from(args[0]).slice(offset, offset + limit)
14
18
 
15
19
  let contents = ''