Skip to content

Commit

Permalink
Merge pull request #27 from imgix/26-null-firefox-caption
Browse files Browse the repository at this point in the history
Only show caption if the attribute is present
  • Loading branch information
paulstraw authored Aug 4, 2016
2 parents 9bc9fa6 + ee94ed2 commit edc1316
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions dist/Luminous.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,9 @@ var Lightbox = function () {
key: '_updateCaption',
value: function _updateCaption() {
var captionAttr = this.settings.captionAttribute;
if (captionAttr) {
this.captionEl.innerText = this.currentTrigger.getAttribute(captionAttr);
var caption = this.currentTrigger.getAttribute(captionAttr);
if (captionAttr && caption) {
this.captionEl.innerText = caption;
}
}
}, {
Expand Down
Loading

0 comments on commit edc1316

Please sign in to comment.