Skip to content

Commit

Permalink
fix: allow "closeWithEscape" and "injectBaseStyles" to be overriden w…
Browse files Browse the repository at this point in the history
…hen initializing
  • Loading branch information
sherwinski authored and sherwinski committed Oct 31, 2020
1 parent 55819e4 commit fd7dde8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/Luminous.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default class Luminous {
// The event to listen to on the _lightbox_ element: triggers closing.
const closeTrigger = options["closeTrigger"] || "click";
// Allow closing by pressing escape.
const closeWithEscape = options["closeWithEscape"] || true;
const closeWithEscape = "closeWithEscape" in options ? !!options["closeWithEscape"] : true;
// Automatically close when the page is scrolled.
const closeOnScroll = options["closeOnScroll"] || false;
const closeButtonEnabled =
Expand All @@ -67,7 +67,7 @@ export default class Luminous {
const includeImgixJSClass = options["includeImgixJSClass"] || false;
// Add base styles to the page. See the "Theming"
// section of README.md for more information.
const injectBaseStyles = options["injectBaseStyles"] || true;
const injectBaseStyles = "injectBaseStyles" in options ? !!options["injectBaseStyles"] : true;
// Internal use only!
const _gallery = options["_gallery"] || null;
const _arrowNavigation = options["_arrowNavigation"] || null;
Expand Down

0 comments on commit fd7dde8

Please sign in to comment.