Remove unneccesary if statement

name = Sol
email = solomonabrahams100@gmail.com
This commit is contained in:
Sol
2020-07-14 15:49:02 +01:00
committed by Lachlan Kermode
parent d1990b62af
commit 71d1664542
2 changed files with 5 additions and 7 deletions

View File

@@ -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 => {

View File

@@ -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))
})
})