diff options
author | Mario <mario@mariovavti.com> | 2021-07-29 08:25:05 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-07-29 08:25:05 +0000 |
commit | d459dfac74e90c29950d49a82edc19fd913d435e (patch) | |
tree | 7bed5f2dbc318f87bbe0f4be2cde3dde09cd97c7 /vendor/twbs/bootstrap/js/src/alert.js | |
parent | cec2f0d894b80f3affeb60cff2d4afa49a2019a8 (diff) | |
download | volse-hubzilla-d459dfac74e90c29950d49a82edc19fd913d435e.tar.gz volse-hubzilla-d459dfac74e90c29950d49a82edc19fd913d435e.tar.bz2 volse-hubzilla-d459dfac74e90c29950d49a82edc19fd913d435e.zip |
update to bootstrap 5.0.2
Diffstat (limited to 'vendor/twbs/bootstrap/js/src/alert.js')
-rw-r--r-- | vendor/twbs/bootstrap/js/src/alert.js | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/vendor/twbs/bootstrap/js/src/alert.js b/vendor/twbs/bootstrap/js/src/alert.js index 87cc7e731..75dbec71b 100644 --- a/vendor/twbs/bootstrap/js/src/alert.js +++ b/vendor/twbs/bootstrap/js/src/alert.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.1): alert.js + * Bootstrap (v5.0.2): alert.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -9,7 +9,6 @@ import { defineJQueryPlugin, getElementFromSelector } from './util/index' -import Data from './dom/data' import EventHandler from './dom/event-handler' import BaseComponent from './base-component' @@ -78,9 +77,7 @@ class Alert extends BaseComponent { } _destroyElement(element) { - if (element.parentNode) { - element.parentNode.removeChild(element) - } + element.remove() EventHandler.trigger(element, EVENT_CLOSED) } @@ -89,11 +86,7 @@ class Alert extends BaseComponent { static jQueryInterface(config) { return this.each(function () { - let data = Data.get(this, DATA_KEY) - - if (!data) { - data = new Alert(this) - } + const data = Alert.getOrCreateInstance(this) if (config === 'close') { data[config](this) |