Skip to content

Commit

Permalink
Avoid using == CesiumGS#5819
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Bernstein committed Oct 23, 2017
1 parent 6b6f55c commit 4b0b03a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Source/DataSources/KmlDataSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,11 @@ define([

if (!defined(billboard.image)) {
billboard.image = dataSource._pinBuilder.fromColor(Color.YELLOW, 64);
} else if (billboard.image == false) {

// If there were empty <Icon> tags in the KML, then billboard.image was set to false above
// However, in this case, the false value would have been converted to a property afterwards
// Thus, we check if billboard.image is defined with value of false
} else if (billboard.image && !billboard.image.getValue()) {
billboard.image = undefined;
}

Expand Down

0 comments on commit 4b0b03a

Please sign in to comment.