File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -382,12 +382,12 @@ class GeoTIFFImage {
382
382
offset = this . fileDirectory . StripOffsets [ index ] ;
383
383
byteCount = this . fileDirectory . StripByteCounts [ index ] ;
384
384
}
385
- const slice = ( await this . source . fetch ( [ { offset, length : byteCount } ] , signal ) ) [ 0 ] ;
386
385
387
386
let request ;
388
387
if ( tiles === null || ! tiles [ index ] ) {
389
388
// resolve each request by potentially applying array normalization
390
389
request = ( async ( ) => {
390
+ const slice = ( await this . source . fetch ( [ { offset, length : byteCount } ] , signal ) ) [ 0 ] ;
391
391
let data = await poolOrDecoder . decode ( this . fileDirectory , slice ) ;
392
392
const sampleFormat = this . getSampleFormat ( ) ;
393
393
const bitsPerSample = this . getBitsPerSample ( ) ;
@@ -408,6 +408,11 @@ class GeoTIFFImage {
408
408
// set the cache
409
409
if ( tiles !== null ) {
410
410
tiles [ index ] = request ;
411
+ request . catch ( ( ) => {
412
+ if ( tiles [ index ] === request ) {
413
+ tiles [ index ] = null ;
414
+ }
415
+ } ) ;
411
416
}
412
417
} else {
413
418
// get from the cache
You can’t perform that action at this time.
0 commit comments