Skip to content

Commit 4b0b03a

Browse files
author
Josh Bernstein
committed
Avoid using == CesiumGS#5819
1 parent 6b6f55c commit 4b0b03a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Source/DataSources/KmlDataSource.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -1146,7 +1146,11 @@ define([
11461146

11471147
if (!defined(billboard.image)) {
11481148
billboard.image = dataSource._pinBuilder.fromColor(Color.YELLOW, 64);
1149-
} else if (billboard.image == false) {
1149+
1150+
// If there were empty <Icon> tags in the KML, then billboard.image was set to false above
1151+
// However, in this case, the false value would have been converted to a property afterwards
1152+
// Thus, we check if billboard.image is defined with value of false
1153+
} else if (billboard.image && !billboard.image.getValue()) {
11501154
billboard.image = undefined;
11511155
}
11521156

0 commit comments

Comments
 (0)