kopia lustrzana https://github.com/FacilMap/facilmap
Fix description of objects in GPX export (fixes #50)
- Values were missing from description - If there is only the default field (Description), it is not prefixed by "Description: "pull/108/head
rodzic
95c226305b
commit
14900f3c72
|
@ -3,9 +3,12 @@ var utils = require("./utils");
|
|||
var _e = utils.escapeXml;
|
||||
|
||||
function _dataToText(fields, data) {
|
||||
if(fields.length == 1 && fields[0].name == "Description")
|
||||
return data["Description"] || "";
|
||||
|
||||
var text = [ ];
|
||||
for(var i=0; i<fields.length; i++) {
|
||||
text.push(fields[i].name + ": " + (data[fields[i]] || ""));
|
||||
text.push(fields[i].name + ": " + (data[fields[i].name] || ""));
|
||||
}
|
||||
return text.join('\n\n');
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue