setState never occures
Two changes for better parsing of non-existing input sources: 1 - use goog.isDefAndNotNull(source) in the condition (null is also considered as valid source now) 2 - call setState before goog.asserts.fail
This commit is contained in:
@@ -128,11 +128,11 @@ ol.source.VectorFile.prototype.handleXhrIo_ = function(event) {
|
||||
goog.asserts.fail();
|
||||
}
|
||||
goog.dispose(xhrIo);
|
||||
if (goog.isDef(source)) {
|
||||
if (goog.isDefAndNotNull(source)) {
|
||||
this.readFeatures_(source);
|
||||
} else {
|
||||
goog.asserts.fail();
|
||||
this.setState(ol.source.State.ERROR);
|
||||
goog.asserts.fail();
|
||||
}
|
||||
} else {
|
||||
this.setState(ol.source.State.ERROR);
|
||||
|
||||
Reference in New Issue
Block a user