@@ -931,8 +931,8 @@ function preload(that, data, options, clear) {
931
931
sourceUri = defaultValue ( sourceUri , data . getUrlComponent ( ) ) ;
932
932
933
933
// 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 ;
936
936
if ( defined ( credits ) ) {
937
937
const length = credits . length ;
938
938
for ( let i = 0 ; i < length ; i ++ ) {
@@ -958,7 +958,6 @@ function preload(that, data, options, clear) {
958
958
clampToGround : defaultValue ( options . clampToGround , defaultClampToGround ) ,
959
959
} ;
960
960
961
- const that = this ;
962
961
return when ( promise , function ( geoJson ) {
963
962
return load ( that , geoJson , options , sourceUri , clear ) ;
964
963
} ) . otherwise ( function ( error ) {
@@ -983,7 +982,7 @@ GeoJsonDataSource.prototype.update = function (time) {
983
982
} ;
984
983
985
984
function load ( that , geoJson , options , sourceUri , clear ) {
986
- var name ;
985
+ let name ;
987
986
if ( defined ( sourceUri ) ) {
988
987
name = getFilenameFromUri ( sourceUri ) ;
989
988
}
0 commit comments