mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-13 05:48:36 +03:00
Remove unneccesary if statement
name = Sol email = solomonabrahams100@gmail.com
This commit is contained in:
@@ -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 => {
|
||||
|
||||
@@ -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))
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user