From f90d9814d585dcb3ab89801393c3b4c0214f1c31 Mon Sep 17 00:00:00 2001 From: Ian Gilman Date: Mon, 1 Apr 2024 09:52:27 -0700 Subject: [PATCH] Fixed for older JavaScript --- src/iiiftilesource.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/iiiftilesource.js b/src/iiiftilesource.js index 1433a968..fd675753 100644 --- a/src/iiiftilesource.js +++ b/src/iiiftilesource.js @@ -145,7 +145,9 @@ $.IIIFTileSource = function( options ){ if( this.sizes ) { var sizeLength = this.sizes.length; if ( (sizeLength === options.maxLevel) || (sizeLength === options.maxLevel + 1) ) { - this.levelSizes = this.sizes.slice().sort(( size1, size2 ) => size1.width - size2.width); + this.levelSizes = this.sizes.slice().sort(function( size1, size2 ) { + return size1.width - size2.width; + }); // Need to take into account that the list may or may not include the full resolution size if( sizeLength === options.maxLevel ) { this.levelSizes.push( {width: this.width, height: this.height} );