don't permalink negative IDs (fixes #1374)

This commit is contained in:
Ansis Brammanis
2013-04-25 11:16:56 -04:00
parent 579e6a8a8b
commit 4e305ea773

View File

@@ -91,10 +91,16 @@ iD.modes.Select = function(context, selection) {
});
});
var q = iD.util.stringQs(location.hash.substring(1));
location.replace('#' + iD.util.qsString(_.assign(q, {
id: selection.join(',')
}), true));
var notNew = selection.filter(function(id) {
return !context.entity(id).isNew();
});
if (notNew.length) {
var q = iD.util.stringQs(location.hash.substring(1));
location.replace('#' + iD.util.qsString(_.assign(q, {
id: notNew.join(',')
}), true));
}
if (singular()) {
inspector = iD.ui.Inspector(context, singular())