Avoid custom headers to be undefined
This commit is contained in:
@@ -353,7 +353,9 @@ function incrementMapViews ({ metadataBackend }) {
|
||||
|
||||
const statTag = mapConfig.obj().stat_tag;
|
||||
|
||||
res.set('Carto-Stat-Tag', `${statTag}`);
|
||||
if (statTag) {
|
||||
res.set('Carto-Stat-Tag', `${statTag}`);
|
||||
}
|
||||
|
||||
metadataBackend.incMapviewCount(user, statTag, (err) => {
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user