diff --git a/cmd/mtwebmapper/web/index.html b/cmd/mtwebmapper/web/index.html
index 43cad34..daafae3 100644
--- a/cmd/mtwebmapper/web/index.html
+++ b/cmd/mtwebmapper/web/index.html
@@ -136,7 +136,7 @@ manualUpdateControl = L.easyButton('fa-refresh',
for (var i = 0; i < tiles.length; i++) {
var img = tiles[i];
var cl = img.getAttribute("class");
- if (cl.contains("leaflet-tile-loaded")) {
+ if (cl.indexOf("leaflet-tile-loaded") >= 0) {
var src = img.src;
var idx = src.lastIndexOf("#");
if (idx >= 0) {
diff --git a/cmd/mtwebmapper/web/js/auto-update.js b/cmd/mtwebmapper/web/js/auto-update.js
index 9f28925..fee0617 100644
--- a/cmd/mtwebmapper/web/js/auto-update.js
+++ b/cmd/mtwebmapper/web/js/auto-update.js
@@ -137,7 +137,7 @@ L.Control.AutoUpdate = L.Control.extend({
for (var i = 0; i < tiles.length; i++) {
var img = tiles[i];
var cl = img.getAttribute('class');
- if (!cl.contains('leaflet-tile-loaded')) {
+ if (cl.indexOf('leaflet-tile-loaded') < 0) {
continue;
}
var src = img.src;