File tree Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -28,13 +28,9 @@ const DATA_KEY = 'coreui.sidebar'
28
28
const EVENT_KEY = `.${ DATA_KEY } `
29
29
const DATA_API_KEY = '.data-api'
30
30
31
- const Default = {
32
- //
33
- }
31
+ const Default = { }
34
32
35
- const DefaultType = {
36
- //
37
- }
33
+ const DefaultType = { }
38
34
39
35
const CLASS_NAME_BACKDROP = 'sidebar-backdrop'
40
36
const CLASS_NAME_FADE = 'fade'
@@ -206,17 +202,11 @@ class Sidebar extends BaseComponent {
206
202
207
203
_getConfig ( config ) {
208
204
config = {
209
- ...this . constructor . Default ,
205
+ ...Default ,
210
206
...Manipulator . getDataAttributes ( this . _element ) ,
211
- ...config
207
+ ...( typeof config === 'object' ? config : { } )
212
208
}
213
-
214
- typeCheckConfig (
215
- NAME ,
216
- config ,
217
- this . constructor . DefaultType
218
- )
219
-
209
+ typeCheckConfig ( NAME , config , DefaultType )
220
210
return config
221
211
}
222
212
You can’t perform that action at this time.
0 commit comments