mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 13:28:36 +03:00
allow dates for starting timerange to be in config
This commit is contained in:
committed by
Franc Camps-Febrer
parent
b7618543f7
commit
e25a634cf6
@@ -40,8 +40,8 @@ const initial = {
|
|||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
timerange: [
|
timerange: [
|
||||||
d3.timeParse("%Y-%m-%dT%H:%M:%S")("2013-02-23T12:00:00"),
|
new Date(2013, 2, 23, 12),
|
||||||
d3.timeParse("%Y-%m-%dT%H:%M:%S")("2016-02-23T12:00:00")
|
new Date(2016, 2, 23, 12)
|
||||||
],
|
],
|
||||||
mapBounds: null,
|
mapBounds: null,
|
||||||
tags: [],
|
tags: [],
|
||||||
@@ -107,4 +107,9 @@ if (process.env.store) {
|
|||||||
} else {
|
} else {
|
||||||
appStore = initial
|
appStore = initial
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NB: config.js dates get implicitly converted to strings in mergeDeepLeft
|
||||||
|
appStore.app.filters.timerange[0] = new Date(appStore.app.filters.timerange[0])
|
||||||
|
appStore.app.filters.timerange[1] = new Date(appStore.app.filters.timerange[1])
|
||||||
|
|
||||||
export default appStore
|
export default appStore
|
||||||
|
|||||||
Reference in New Issue
Block a user