Avoid making an empty hashtags tag

This commit is contained in:
Bryan Housel
2017-08-17 12:06:16 -04:00
parent 2bf7a5e08b
commit 121a1fa629
+5 -1
View File
@@ -59,11 +59,14 @@ export function uiCommit(context) {
comment: comment,
created_by: ('iD ' + context.version).substr(0, 255),
imagery_used: context.history().imageryUsed().join(';').substr(0, 255),
hashtags: hashtags,
host: detected.host.substr(0, 255),
locale: detected.locale.substr(0, 255)
};
if (hashtags) {
tags.hashtags = hashtags;
}
changeset = new osmChangeset({ tags: tags });
}
@@ -329,6 +332,7 @@ export function uiCommit(context) {
tags.hashtags = arr.join(';').substr(0, 255);
context.storage('hashtags', tags.hashtags);
} else {
delete tags.hashtags;
context.storage('hashtags', null);
}
}