Skip to content

Commit d374ad2

Browse files
committed
Update worldmap.js
1 parent ddac0fc commit d374ad2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

worldmap/worldmap.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3346,7 +3346,7 @@ function doGeojson(n,g,l,o,i) { // name, geojson, layer, options, icon
33463346
// handle TAK messages from TAK server tcp - XML->JSON
33473347
function doTAKjson(p) {
33483348
//console.log("TAK event",p);
3349-
if (p.type.indexOf('a-') === 0 || p.type.indexOf('b-m-p-') === 0 || p.type.indexOf('b-a-o-') === 0 || p.type.indexOf('b-a-g') === 0) {
3349+
if (p?.type && (p.type.indexOf('a-') === 0 || p.type.indexOf('b-m-p-') === 0 || p.type.indexOf('b-a-o-') === 0 || p.type.indexOf('b-a-g') === 0)) {
33503350
var d = {};
33513351
d.name = p.detail?.contact?.callsign || p.uid;
33523352
d.lat = Number(p.point.lat);
@@ -3402,7 +3402,7 @@ function doTAKjson(p) {
34023402
// handle TAK messages from TAK Multicast - Protobuf->JSON
34033403
function doTAKMCjson(p) {
34043404
// console.log("TAK Multicast event",p);
3405-
if (p.type.indexOf('a') === 0) {
3405+
if (p?.type && p.type.indexOf('a') === 0) {
34063406
var d = {};
34073407
d.lat = p.lat;
34083408
d.lon = p.lon;

0 commit comments

Comments
 (0)