Skip to content

Commit e536f1a

Browse files
committed
fix: Cannot set property Constructor of undefined
1 parent 93063ae commit e536f1a

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

js/src/navigation.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
/**
22
* --------------------------------------------------------------------------
3-
* CoreUI (v4.0.4): alert.js
3+
* CoreUI (v4.0.4): navigation.js
44
* Licensed under MIT (https://coreui.io/license)
55
* --------------------------------------------------------------------------
66
*/
77

88
import {
99
defineJQueryPlugin,
10-
// emulateTransitionEnd,
11-
// getTransitionDurationFromElement,
1210
typeCheckConfig
1311
} from './util/index'
1412
import Data from './dom/data'
@@ -82,6 +80,10 @@ class Navigation extends BaseComponent {
8280
return DefaultType
8381
}
8482

83+
static get NAME() {
84+
return NAME
85+
}
86+
8587
// Private
8688

8789
_getConfig(config) {
@@ -293,6 +295,6 @@ EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
293295
* add .Navigation to jQuery only if jQuery is present
294296
*/
295297

296-
defineJQueryPlugin(NAME, Navigation)
298+
defineJQueryPlugin(Navigation)
297299

298300
export default Navigation

js/src/sidebar.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,15 @@ const SELECTOR_SIDEBAR = '.sidebar'
5959
class Sidebar extends BaseComponent {
6060
constructor(element, config) {
6161
super(element)
62+
6263
this._config = this._getConfig(config)
6364
this._show = this._isVisible()
6465
this._mobile = this._isMobile()
6566
this._overlaid = this._isOverlaid()
6667
this._narrow = this._isNarrow()
6768
this._unfoldable = this._isUnfoldable()
6869
this._backdrop = null
70+
6971
this._addEventListeners()
7072
}
7173

@@ -342,6 +344,6 @@ EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
342344
* ------------------------------------------------------------------------
343345
*/
344346

345-
defineJQueryPlugin(NAME, Sidebar)
347+
defineJQueryPlugin(Sidebar)
346348

347349
export default Sidebar

0 commit comments

Comments
 (0)