Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/baguetteBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@

buildOverlay();
removeFromCache(selector);
setOptions(userOptions);
return bindImageClickListeners(selector, userOptions);
}

Expand Down Expand Up @@ -384,6 +385,9 @@
// Fill options object
for (var item in defaults) {
options[item] = defaults[item];
if (!options[item]) {
options[item] = defaults[item];
}
Comment on lines 387 to +390
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is an old PR, but can you explain what it's fixing? Maybe I'm missing something, but I don't see how this code changes anything by assigning the same value twice

if (typeof newOptions[item] !== 'undefined') {
options[item] = newOptions[item];
}
Expand Down