changeset 868:b7258b7334e3 jquery

can't delete from undefined
author hertzhaft
date Sun, 13 Mar 2011 23:23:36 +0100
parents 87d523489ae9
children 5396529b3f46
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;
             });