vrembem 3.0.4 → 3.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -308,12 +308,14 @@ function localStore(key, enable = true) {
308
308
 
309
309
  return new Proxy(getStore(), {
310
310
  set: (target, property, value) => {
311
- target[property] = value;
312
- if (enable) setStore(target);
313
- return true;
314
- },
315
- deleteProperty: (target, property) => {
316
- delete target[property];
311
+ console.log('localStore() => set');
312
+
313
+ if (value === undefined) {
314
+ delete target[property];
315
+ } else {
316
+ target[property] = value;
317
+ }
318
+
317
319
  if (enable) setStore(target);
318
320
  return true;
319
321
  }
@@ -631,7 +633,7 @@ async function deregister$2(obj, close = true) {
631
633
  } // Remove entry from local store.
632
634
 
633
635
 
634
- delete this.store[entry.id]; // Unmount the MatchMedia functionality.
636
+ this.store[entry.id] = undefined; // Unmount the MatchMedia functionality.
635
637
 
636
638
  entry.unmountBreakpoint(); // Delete properties from collection entry.
637
639
 
@@ -646,12 +648,12 @@ async function deregister$2(obj, close = true) {
646
648
  return this.collection;
647
649
  }
648
650
 
649
- function L() {
651
+ function g() {
650
652
  return getComputedStyle(document.body).getPropertyValue("--vrembem-variable-prefix").trim();
651
653
  }
652
654
 
653
655
  function getBreakpoint(drawer) {
654
- const prefix = L();
656
+ const prefix = g();
655
657
  const bp = drawer.getAttribute(`data-${this.settings.dataBreakpoint}`);
656
658
 
657
659
  if (this.settings.breakpoints && this.settings.breakpoints[bp]) {
@@ -1697,7 +1699,7 @@ function getConfig(el, settings) {
1697
1699
 
1698
1700
  for (const prop in config) {
1699
1701
  // Get the CSS variable property values.
1700
- const prefix = L();
1702
+ const prefix = g();
1701
1703
  const value = styles.getPropertyValue(`--${prefix}popover-${prop}`).trim(); // If a value was found, replace the default in config obj.
1702
1704
 
1703
1705
  if (value) {