diff --git a/cartoframes/assets/src/bundle.js b/cartoframes/assets/src/bundle.js
index 9c4cf6dcb..c81dc6a83 100644
--- a/cartoframes/assets/src/bundle.js
+++ b/cartoframes/assets/src/bundle.js
@@ -585,7 +585,7 @@ var init = (function () {
.setLngLat([event.coordinates.lng, event.coordinates.lat])
.setHTML(`
`);
- if (!popup.isOpen()) {
+ if (popupHTML.length > 0 && !popup.isOpen()) {
popup.addTo(map);
}
} else {
diff --git a/cartoframes/assets/src/map/popups.js b/cartoframes/assets/src/map/popups.js
index ee7528954..df3ff6e7f 100644
--- a/cartoframes/assets/src/map/popups.js
+++ b/cartoframes/assets/src/map/popups.js
@@ -51,7 +51,7 @@ export function updatePopup(map, popup, event, attrs) {
.setLngLat([event.coordinates.lng, event.coordinates.lat])
.setHTML(``);
- if (!popup.isOpen()) {
+ if (popupHTML.length > 0 && !popup.isOpen()) {
popup.addTo(map);
}
} else {