mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 21:38:35 +03:00
make USE_CATEGORIES optional
This commit is contained in:
@@ -31,9 +31,12 @@ export function fetchDomain () {
|
||||
.then(response => response.json())
|
||||
.catch(() => handleError('events'))
|
||||
|
||||
const catPromise = fetch(CATEGORY_URL)
|
||||
.then(response => response.json())
|
||||
.catch(() => handleError(domainMsg('categories')))
|
||||
let catPromise = Promise.resolve([])
|
||||
if (features.USE_CATEGORIES) {
|
||||
catPromise = fetch(CATEGORY_URL)
|
||||
.then(response => response.json())
|
||||
.catch(() => handleError(domainMsg('categories')))
|
||||
}
|
||||
|
||||
let narPromise = Promise.resolve([])
|
||||
if (features.USE_NARRATIVES) {
|
||||
|
||||
Reference in New Issue
Block a user