Skip to content

Commit 059d87d

Browse files
committed
Comply with eslint no-var
1 parent 191f2a1 commit 059d87d

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Source/DataSources/GeoJsonDataSource.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -931,8 +931,8 @@ function preload(that, data, options, clear) {
931931
sourceUri = defaultValue(sourceUri, data.getUrlComponent());
932932

933933
// Add resource credits to our list of credits to display
934-
var resourceCredits = that._resourceCredits;
935-
var credits = data.credits;
934+
const resourceCredits = that._resourceCredits;
935+
const credits = data.credits;
936936
if (defined(credits)) {
937937
const length = credits.length;
938938
for (let i = 0; i < length; i++) {
@@ -958,7 +958,6 @@ function preload(that, data, options, clear) {
958958
clampToGround: defaultValue(options.clampToGround, defaultClampToGround),
959959
};
960960

961-
const that = this;
962961
return when(promise, function (geoJson) {
963962
return load(that, geoJson, options, sourceUri, clear);
964963
}).otherwise(function (error) {
@@ -983,7 +982,7 @@ GeoJsonDataSource.prototype.update = function (time) {
983982
};
984983

985984
function load(that, geoJson, options, sourceUri, clear) {
986-
var name;
985+
let name;
987986
if (defined(sourceUri)) {
988987
name = getFilenameFromUri(sourceUri);
989988
}

Specs/DataSources/GeoJsonDataSourceSpec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ describe("DataSources/GeoJsonDataSource", function () {
420420
});
421421

422422
it("Adds a feature without removing existing entities", function () {
423-
var dataSource = new GeoJsonDataSource();
423+
const dataSource = new GeoJsonDataSource();
424424
return dataSource.load(feature).then(function () {
425425
return dataSource.process(mixedGeometries).then(function () {
426426
// `feature` has one Entity, `mixedGeometries` has 3

0 commit comments

Comments
 (0)