aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/js/dist/dom/data.js
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-03-19 13:55:18 +0000
committerMario <mario@mariovavti.com>2023-03-19 13:55:18 +0000
commit89285f1408d21091bb80d45b391ddcbe06ba8d0f (patch)
treeb2eb07d9f3d91d77f89a4565a58e6e5231b20c1c /vendor/twbs/bootstrap/js/dist/dom/data.js
parent0a679e503ef367eda3085c44af103ee53869a94f (diff)
parent17c0bb2069dcfe35d3febc5bfdb3a7295f15d49c (diff)
downloadvolse-hubzilla-8.2.tar.gz
volse-hubzilla-8.2.tar.bz2
volse-hubzilla-8.2.zip
Merge branch '8.2RC'8.2
Diffstat (limited to 'vendor/twbs/bootstrap/js/dist/dom/data.js')
-rw-r--r--vendor/twbs/bootstrap/js/dist/dom/data.js18
1 files changed, 7 insertions, 11 deletions
diff --git a/vendor/twbs/bootstrap/js/dist/dom/data.js b/vendor/twbs/bootstrap/js/dist/dom/data.js
index a134743d8..8ea436b1e 100644
--- a/vendor/twbs/bootstrap/js/dist/dom/data.js
+++ b/vendor/twbs/bootstrap/js/dist/dom/data.js
@@ -1,5 +1,5 @@
/*!
- * Bootstrap data.js v5.2.2 (https://getbootstrap.com/)
+ * Bootstrap data.js v5.3.0-alpha1 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@@ -11,7 +11,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.2.2): dom/data.js
+ * Bootstrap (v5.3.0-alpha1): dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -19,46 +19,42 @@
/**
* Constants
*/
+
const elementMap = new Map();
const data = {
set(element, key, instance) {
if (!elementMap.has(element)) {
elementMap.set(element, new Map());
}
+ const instanceMap = elementMap.get(element);
- const instanceMap = elementMap.get(element); // make it clear we only want one instance per element
+ // make it clear we only want one instance per element
// can be removed later when multiple key/instances are fine to be used
-
if (!instanceMap.has(key) && instanceMap.size !== 0) {
// eslint-disable-next-line no-console
console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);
return;
}
-
instanceMap.set(key, instance);
},
-
get(element, key) {
if (elementMap.has(element)) {
return elementMap.get(element).get(key) || null;
}
-
return null;
},
-
remove(element, key) {
if (!elementMap.has(element)) {
return;
}
-
const instanceMap = elementMap.get(element);
- instanceMap.delete(key); // free up element references if there are no instances left for an element
+ instanceMap.delete(key);
+ // free up element references if there are no instances left for an element
if (instanceMap.size === 0) {
elementMap.delete(element);
}
}
-
};
return data;