diff --git a/src/tilesource.js b/src/tilesource.js index 2f50374c..fcf2be82 100644 --- a/src/tilesource.js +++ b/src/tilesource.js @@ -654,8 +654,7 @@ function processResponse( xhr ){ } catch (e){ data = xhr.responseText; } - /* eslint-disable no-useless-escape */ - }else if( responseText.match(/\s*[\{\[].*/) ){ + }else if( responseText.match(/\s*[{[].*/) ){ try{ data = $.parseJSON(responseText); } catch(e){ diff --git a/src/viewer.js b/src/viewer.js index 1e5486e7..b5b24318 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -2288,8 +2288,7 @@ function getTileSourceImplementation( viewer, tileSource, imgOptions, successCal if ( tileSource.match( /^\s*<.*>\s*$/ ) ) { tileSource = $.parseXml( tileSource ); //json should start with "{" or "[" and end with "}" or "]" - /* eslint-disable no-useless-escape */ - } else if ( tileSource.match(/^\s*[\{\[].*[\}\]]\s*$/ ) ) { + } else if ( tileSource.match(/^\s*[{[].*[}\]]\s*$/ ) ) { try { var tileSourceJ = $.parseJSON(tileSource); tileSource = tileSourceJ; @@ -3195,7 +3194,7 @@ function onCanvasScroll( event ) { } } - return true; + return undefined; } function onContainerEnter( event ) {