diff --git a/src/dzitilesource.js b/src/dzitilesource.js index 1becfa4a..8bb82406 100644 --- a/src/dzitilesource.js +++ b/src/dzitilesource.js @@ -262,7 +262,7 @@ function configureFromXML( tileSource, xmlDoc ){ } dispRectNodes = root.getElementsByTagName( "DisplayRect" ); - if (dispRectNodes === undefined) { + if (dispRectNodes.length === 0) { dispRectNodes = root.getElementsByTagNameNS(ns, "DisplayRect" )[ 0 ]; } for ( i = 0; i < dispRectNodes.length; i++ ) {