[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] maps: Sometimes (according to permissions) links are not rendered and...
"Jonny Bradley \(@jonnybradley\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6995e4feafe2_3b9c7dcc349a0@gitlab-sidekiq-low-urgency-cpu-bound-v2-68c86796b8-lx7vr.mail> |
Jonny Bradley pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
bbea470b by Jonny Bradley at 2026-02-18T15:44:04+00:00
[FIX] maps: Sometimes (according to permissions) links are not rendered and...
---
* [FIX] maps: Sometimes (according to permissions) links are not rendered and can cause a jQuery exception, breaking feature loading, so absorb any errors and try to carry on.
See merge request tikiwiki/tiki!9597
- - - - -
1 changed file:
- src/js/jquery-tiki/tiki-maps-ol3.js
Changes:
=====================================
src/js/jquery-tiki/tiki-maps-ol3.js
=====================================
@@ -1476,14 +1476,16 @@ import { defaults as defaultControls } from "ol/control";
form.autoLayers.push(layerName);
}
- var icon;
- $(i.link).each(function () {
- // if the object has an img with it (tracker status for instance) then we need to find the <a>
- if ($(this).is("a")) {
- // and just using $(i.link).find("a") doesn"t work for some reason
- icon = $(this).data("icon-src");
- }
- });
+ let icon = "";
+ try {
+ $(i.link).each(function () {
+ // if the object has an img with it (tracker status for instance) then we need to find the <a>
+ if ($(this).is("a")) {
+ // and just using $(i.link).find("a") doesn't work for some reason
+ icon = $(this).data("icon-src");
+ }
+ });
+ } catch (e) {}
if (i.geo_location) {
$(container).addMapMarker({
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/bbea470b8b3b42be2e9b9b5754ae342d4ae7daf1
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/bbea470b8b3b42be2e9b9b5754ae342d4ae7daf1
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs