Feature opt_geometryOrProperties cannot be null

This commit is contained in:
Florent gravin
2018-09-18 13:40:25 +02:00
parent 25ade66017
commit 8b83371272
3 changed files with 7 additions and 6 deletions

View File

@@ -99,10 +99,9 @@ class Feature extends BaseObject {
this.handleGeometryChanged_, this);
if (opt_geometryOrProperties !== undefined) {
if (opt_geometryOrProperties instanceof Geometry ||
!opt_geometryOrProperties) {
if (opt_geometryOrProperties instanceof Geometry) {
const geometry = /** @type {?Geometry} */ (opt_geometryOrProperties);
const geometry = /** @type {Geometry} */ (opt_geometryOrProperties);
this.setGeometry(geometry);
} else {
/** @type {Object<string, *>} */