]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
fall back to default settings if the data attribute is missing 5901/head
authorPeter Schilling <peter@peterschilling.org>
Mon, 6 Oct 2014 22:48:51 +0000 (15:48 -0700)
committerPeter Schilling <peter@peterschilling.org>
Mon, 6 Oct 2014 22:48:51 +0000 (15:48 -0700)
js/foundation/foundation.reveal.js

index ab7efefa176cbe0e89c35a04681c9e164245f48e..ade3914b02f19451e84b906e8f5c606c6794d864 100644 (file)
@@ -71,7 +71,7 @@
           e.preventDefault();
 
           if (!self.locked) {
-            var settings = S('[' + self.attr_name() + '].open').data(self.attr_name(true) + '-init'),
+            var settings = S('[' + self.attr_name() + '].open').data(self.attr_name(true) + '-init') || self.settings,
                 bg_clicked = S(e.target)[0] === S('.' + settings.bg_class)[0];
 
             if (bg_clicked) {