Skip to content

Instantly share code, notes, and snippets.

@ssx
Created May 24, 2022 13:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssx/275bc6c9674277ed8d26592235f1cc6b to your computer and use it in GitHub Desktop.
Save ssx/275bc6c9674277ed8d26592235f1cc6b to your computer and use it in GitHub Desktop.
diff --git a/lib/web/jquery/bootstrap/collapse.js b/lib/web/jquery/bootstrap/collapse.js
index 95e28cec248..5a978bcfafb 100644
--- a/lib/web/jquery/bootstrap/collapse.js
+++ b/lib/web/jquery/bootstrap/collapse.js
@@ -32,7 +32,7 @@ define([
const VERSION = '5.1.3'
const NAME = 'collapse'
const DATA_KEY = 'bs.collapse'
- const EVENT_KEY = `.${DATA_KEY}`
+ const EVENT_KEY = `.${DATA_KEY}`;
const DATA_API_KEY = '.data-api'
const Default = {
@@ -45,17 +45,17 @@ define([
parent: '(null|element)'
}
- const EVENT_SHOW = `show${EVENT_KEY}`
- const EVENT_SHOWN = `shown${EVENT_KEY}`
- const EVENT_HIDE = `hide${EVENT_KEY}`
- const EVENT_HIDDEN = `hidden${EVENT_KEY}`
- const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
+ const EVENT_SHOW = `show${EVENT_KEY}`;
+ const EVENT_SHOWN = `shown${EVENT_KEY}`;
+ const EVENT_HIDE = `hide${EVENT_KEY}`;
+ const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
+ const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
const CLASS_NAME_SHOW = 'show'
const CLASS_NAME_COLLAPSE = 'collapse'
const CLASS_NAME_COLLAPSING = 'collapsing'
const CLASS_NAME_COLLAPSED = 'collapsed'
- const CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`
+ const CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`;
const CLASS_NAME_HORIZONTAL = 'collapse-horizontal'
const WIDTH = 'width'
@@ -204,10 +204,10 @@ define([
}
const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1)
- const scrollSize = `scroll${capitalizedDimension}`
+ const scrollSize = `scroll${capitalizedDimension}`;
this._queueCallback(complete, this._element, true)
- this._element.style[dimension] = `${this._element[scrollSize]}px`
+ this._element.style[dimension] = `${this._element[scrollSize]}px`;
}
Collapse.prototype.hide = function() {
@@ -222,7 +222,7 @@ define([
const dimension = this._getDimension()
- this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`
+ this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`;
reflow(this._element)
diff --git a/lib/web/jquery/bootstrap/tab.js b/lib/web/jquery/bootstrap/tab.js
index 928f8de3f37..9805d0b0123 100644
--- a/lib/web/jquery/bootstrap/tab.js
+++ b/lib/web/jquery/bootstrap/tab.js
@@ -28,14 +28,14 @@ define([
const VERSION = '5.1.3'
const NAME = 'tab'
const DATA_KEY = 'bs.tab'
- const EVENT_KEY = `.${DATA_KEY}`
+ const EVENT_KEY = `.${DATA_KEY}`;
const DATA_API_KEY = '.data-api'
- const EVENT_HIDE = `hide${EVENT_KEY}`
- const EVENT_HIDDEN = `hidden${EVENT_KEY}`
- const EVENT_SHOW = `show${EVENT_KEY}`
- const EVENT_SHOWN = `shown${EVENT_KEY}`
- const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
+ const EVENT_HIDE = `hide${EVENT_KEY}`;
+ const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
+ const EVENT_SHOW = `show${EVENT_KEY}`;
+ const EVENT_SHOWN = `shown${EVENT_KEY}`;
+ const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
const CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu'
const CLASS_NAME_ACTIVE = 'active'
@WaPoNe
Copy link

WaPoNe commented Oct 4, 2022

How to apply it without installing the quality patches?

I tried putting in the composer.json file:

"extra": {

        "magento-force": "override",

        "composer-exit-on-patch-failure": true,

        "patches": {

            "*": {

                "Uncaught SyntaxError: Unexpected token 'const'": "patches/composer/MDVA_44887_2_4_4.patch"

            }

        }

    }

and creating MDVA_44887_2_4_4.patch under <mage_dir>/patches/composer/ folder but the patch is not applied.

@antoninobonumore
Copy link

Patch must be applied on " magento/magento2-base" rather then "*"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment