From 1b777c9e629382bdd8be7aad10e83d5d742a0383 Mon Sep 17 00:00:00 2001 From: Andrew Hankinson Date: Sat, 18 Jun 2022 15:16:48 +0200 Subject: [PATCH] Fixed: remove redundant checks Also fixes a JSDoc error for annotating optional parameters. --- src/iiiftilesource.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/iiiftilesource.js b/src/iiiftilesource.js index 200767c8..d1331cd3 100644 --- a/src/iiiftilesource.js +++ b/src/iiiftilesource.js @@ -150,7 +150,7 @@ $.extend( $.IIIFTileSource.prototype, $.TileSource.prototype, /** @lends OpenSea * this tile source. * @function * @param {Object|Array} data - * @param {String} optional - url + * @param {String} [url] - url */ supports: function( data, url ) { @@ -249,13 +249,6 @@ $.extend( $.IIIFTileSource.prototype, $.TileSource.prototype, /** @lends OpenSea } } - // normalize the various possible id properties to an internal one - data._id = data["@id"] || data["id"] || data['identifier'] || null; - - if (!data._id) { - throw new Error( 'Could not determine a property for the tile source ID.' ); - } - if (data.preferredFormats) { for (var f = 0; f < data.preferredFormats.length; f++ ) { if ( OpenSeadragon.imageFormatSupported(data.preferredFormats[f]) ) {