]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Update foundation.reveal.js 6517/head
authorChris Sherman <chrisjsherm@users.noreply.github.com>
Thu, 30 Apr 2015 20:35:09 +0000 (16:35 -0400)
committerChris Sherman <chrisjsherm@users.noreply.github.com>
Thu, 30 Apr 2015 20:35:09 +0000 (16:35 -0400)
Ensure open event has a target before accessing the 'data-reveal-id' attribute. I ran into target === undefined after calling $('#myModal').foundation('reveal', 'open');

js/foundation/foundation.reveal.js

index 82321464ec503cc23064629306b235f29499618e..fca6d5b21fc5114d76ab052a2edb49bd60f076e6 100644 (file)
       settings = settings || this.settings;
 
 
-      if (modal.hasClass('open') && target.attr('data-reveal-id') == modal.attr('id')) {
+      if (modal.hasClass('open') && target !== undefined && target.attr('data-reveal-id') == modal.attr('id')) {
         return self.close(modal);
       }