From 5a8d583d1978d473bdefbd9fd0074ce84c74b110 Mon Sep 17 00:00:00 2001 From: Emma Krantz Date: Fri, 3 May 2019 16:58:56 +1000 Subject: [PATCH] Made comment on image blob loading error handling clearer. --- Source/Core/Resource.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/Resource.js b/Source/Core/Resource.js index b5648423aa31..ad53a48f2ee4 100644 --- a/Source/Core/Resource.js +++ b/Source/Core/Resource.js @@ -944,7 +944,8 @@ define([ window.URL.revokeObjectURL(generatedBlobResource.url); } - // We attach additional information to the error here so that it can be handled by an ImageProvider. + // If the blob load succeeded but the image decode failed, provide access to the blob on the error object because it may provide useful insight. + // In particular, BingMapsImageryProvider uses this to detect the zero-length "image" that some map styles return when a real tile is not available. error.blob = generatedBlob; return when.reject(error);