From d2947da4e28ec418d354553883885aacbc386576 Mon Sep 17 00:00:00 2001 From: Patrick Roberts Date: Fri, 25 Sep 2020 15:31:48 -0500 Subject: [PATCH] Fixed issue in node v10 build --- features/support/world.ts | 13 ++++++++----- package.json | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/features/support/world.ts b/features/support/world.ts index b94c949..ab0e776 100644 --- a/features/support/world.ts +++ b/features/support/world.ts @@ -20,10 +20,11 @@ export default class World extends Map implements IWorldOptions { parseProps (dataTable: DataTable): any { const entries = dataTable.raw(); - return Object.fromEntries( - entries.map( - ([key, token]) => [key, this.parse(token)] - ) + return entries.map( + ([key, token]) => [key, this.parse(token)] + ).reduce( + (props, [key, value]) => Object.assign(props, { [key]: value }), + {} ); } @@ -31,7 +32,9 @@ export default class World extends Map implements IWorldOptions { const arrayMatch = token.match(array); if (arrayMatch !== null) { - return arrayMatch[1].split(',').map(value => this.parse(value.trim())); + return arrayMatch[1].split(',').map( + value => this.parse(value.trim()) + ); } if (literal.test(token)) { diff --git a/package.json b/package.json index 5e6b091..da41a5d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "suspense-service", - "version": "0.0.1-rc", + "version": "0.0.2-rc", "description": "Suspense integration library for React", "repository": "github:patrickroberts/suspense-service", "main": "dst/cjs/suspense-service.js",