mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2025-01-11 09:20:17 +01:00
Replace string.contains() with string.indexOf() which is better supported.
This commit is contained in:
parent
b54b2b6b91
commit
f71db790e7
@ -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) {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user