Avoid custom headers to be undefined

This commit is contained in:
Daniel García Aubert
2020-05-29 16:06:16 +02:00
parent f31e8b43b6
commit 6bcf477532
3 changed files with 7 additions and 2 deletions
+3 -1
View File
@@ -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) {