The issue id now accounts for all entities

This commit is contained in:
Quincy Morgan
2018-12-21 14:51:18 -05:00
parent d9c6bd1f39
commit c593bb3475
+5 -1
View File
@@ -1,4 +1,5 @@
import _isObject from 'lodash-es/isObject';
import _map from 'lodash-es/map';
import { osmEntity } from '../osm';
var ValidationIssueType = Object.freeze({
@@ -25,7 +26,10 @@ export { ValidationIssueType, ValidationIssueSeverity };
export function validationIssue(attrs) {
this.id = function () {
return this.type + osmEntity.key(this.entities[0]);
var entityKeys = _map(this.entities, function(entity) {
return osmEntity.key(entity);
});
return this.type + entityKeys.join();
};
if (!_isObject(attrs)) throw new Error('Input attrs is not an object');