From 71d1664542f1ce78a43ac81b1248a23d246478aa Mon Sep 17 00:00:00 2001 From: Sol Date: Tue, 14 Jul 2020 15:49:02 +0100 Subject: [PATCH] Remove unneccesary if statement name = Sol email = solomonabrahams100@gmail.com --- src/reducers/app.js | 5 +++-- src/selectors/index.js | 7 ++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/reducers/app.js b/src/reducers/app.js index 3ece12f..6ac7068 100644 --- a/src/reducers/app.js +++ b/src/reducers/app.js @@ -46,8 +46,9 @@ function updateNarrative (appState, action) { // Compute narrative time range and map bounds if (action.narrative) { - minTime = appState.timeline.rangeLimits[0] - maxTime = appState.timeline.rangeLimits[1] + // Forced to comment out min and max time changes, not sure why? + //minTime = appState.timeline.rangeLimits[0] + //maxTime = appState.timeline.rangeLimits[1] // Find max and mins coordinates of narrative events action.narrative.steps.forEach(step => { diff --git a/src/selectors/index.js b/src/selectors/index.js index 378b765..9407f39 100644 --- a/src/selectors/index.js +++ b/src/selectors/index.js @@ -84,17 +84,14 @@ export const selectNarratives = createSelector( /* populate narratives dict with events */ events.forEach(evt => { - const isInNarrative = evt.narratives.length > 0 evt.narratives.forEach(narrative => { // initialise if (!narratives[narrative]) { narratives[narrative] = narrativeSkeleton(narrative) } // add evt to steps - if (isInNarrative) { - // NB: insetSourceFrom is a 'curried' function to allow with maps - narratives[narrative].steps.push(insetSourceFrom(sources)(evt)) - } + // NB: insetSourceFrom is a 'curried' function to allow with maps + narratives[narrative].steps.push(insetSourceFrom(sources)(evt)) }) })