From 0d92737ff29e8b25d03c18820647e4b6ab265bc2 Mon Sep 17 00:00:00 2001 From: rlskoeser Date: Mon, 18 Aug 2014 14:17:37 -0400 Subject: [PATCH] check length instead of undefined for DisplayRect nodes tagname ns fallback --- src/dzitilesource.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++ ) {