Просмотр исходного кода

make location plugin url relative to ./dist

Dele Olajide 2 лет назад
Родитель
Сommit
a119c12413
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      packages/location/location.js

+ 1 - 1
packages/location/location.js

@@ -196,7 +196,7 @@
                 const label = message.getAttribute("from");
                 const position = {coords: {accuracy: accuracy, latitude: lat, longitude: lon}};
                 const pos = location.href.lastIndexOf('/') + 1;
-                const url = location.href.substring(0, pos) + "packages/location/leaflet/index.html?accuracy=" + position.coords.accuracy + "&lat=" + position.coords.latitude + "&lon=" + position.coords.longitude + "&label=" + label;
+                const url = _converse.api.settings.get("assets_path") + "../packages/location/leaflet/index.html?accuracy=" + position.coords.accuracy + "&lat=" + position.coords.latitude + "&lon=" + position.coords.longitude + "&label=" + label;
 
                 var prompt = new Notification(label,
                 {