Fixed "Cannot read property 'firstElementChild' of null" on WFS readProjectionFromNode.
Occurs when a FeatureCollection is empty. Code style changes @bartvde Added test case for #3118. Attempt to make jshint happy. Fixed tab character. Another code style change (jshint)....
This commit is contained in:
@@ -89,6 +89,21 @@ describe('ol.format.WFS', function() {
|
||||
|
||||
});
|
||||
|
||||
describe('when parsing FeatureCollection', function() {
|
||||
var xml;
|
||||
before(function(done) {
|
||||
afterLoadText('spec/ol/format/wfs/EmptyFeatureCollection.xml',
|
||||
function(_xml) {
|
||||
xml = _xml;
|
||||
done();
|
||||
});
|
||||
});
|
||||
it('returns an empty array of features when none exist', function() {
|
||||
var result = new ol.format.WFS().readFeatures(xml);
|
||||
expect(result).to.have.length(0);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when parsing FeatureCollection', function() {
|
||||
var response;
|
||||
before(function(done) {
|
||||
|
||||
Reference in New Issue
Block a user