From 5e653b4796056bdd816f73e76b94b0a1b3490487 Mon Sep 17 00:00:00 2001 From: Antoine Vandecreme Date: Mon, 15 Jun 2015 16:43:34 -0400 Subject: [PATCH] Fix assert in cacheTile. --- src/tilecache.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tilecache.js b/src/tilecache.js index 191bb52e..281709c8 100644 --- a/src/tilecache.js +++ b/src/tilecache.js @@ -149,7 +149,6 @@ $.TileCache.prototype = /** @lends OpenSeadragon.TileCache.prototype */{ $.console.assert( options, "[TileCache.cacheTile] options is required" ); $.console.assert( options.tile, "[TileCache.cacheTile] options.tile is required" ); $.console.assert( options.tile.url, "[TileCache.cacheTile] options.tile.url is required" ); - $.console.assert( options.image, "[TileCache.cacheTile] options.image is required" ); $.console.assert( options.tiledImage, "[TileCache.cacheTile] options.tiledImage is required" ); var cutoff = options.cutoff || 0; @@ -157,6 +156,7 @@ $.TileCache.prototype = /** @lends OpenSeadragon.TileCache.prototype */{ var imageRecord = this._imagesLoaded[options.tile.url]; if (!imageRecord) { + $.console.assert( options.image, "[TileCache.cacheTile] options.image is required to create an ImageRecord" ); imageRecord = this._imagesLoaded[options.tile.url] = new ImageRecord({ image: options.image });