Skip to content

Commit

Permalink
use length !==0 for kml entity id checking
Browse files Browse the repository at this point in the history
  • Loading branch information
mmacaula committed Jun 2, 2016
1 parent 5cc572d commit 616a2d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/DataSources/KmlDataSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,11 @@ define([
return url;
}

// an optional context is passed to allow for some malformed kmls (thos with multiple geometries with same ids) to still parse
// an optional context is passed to allow for some malformed kmls (those with multiple geometries with same ids) to still parse
// correctly, as they do in Google Earth.
function getOrCreateEntity(node, entityCollection, context) {
var id = queryStringAttribute(node, 'id');
id = defined(id) && id !=="" ? id : createGuid();
id = defined(id) && id.length !== 0 ? id : createGuid();
if(defined(context)){
id = context + id;
}
Expand Down

0 comments on commit 616a2d4

Please sign in to comment.