changeset 875:8ddc379e83af jquery

can't delete from undefined
author hertzhaft
date Sun, 13 Mar 2011 23:23:36 +0100
parents 46444fe43b15
children a5a460afb912
files client/digitallibrary/jquery/jquery.digilib.regions.js
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/client/digitallibrary/jquery/jquery.digilib.regions.js	Sun Mar 13 21:57:50 2011 +0100
+++ b/client/digitallibrary/jquery/jquery.digilib.regions.js	Sun Mar 13 23:23:36 2011 +0100
@@ -276,8 +276,10 @@
             $regionDiv.append($regionLink);
         }
         if (data.settings.autoRegionLinks) {
-            delete attributes.href;
-            $regionDiv.attr(attributes);
+            if (attributes) {
+                delete attributes.href;
+                $regionDiv.attr(attributes);
+                };
             $regionDiv.bind('click.dlRegion', function() {
                  window.location = url;
             });