Skip to content

Commit

Permalink
Data.get
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Mar 2, 2021
1 parent b2b3d04 commit d0a4cbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/src/offcanvas.js
Expand Up @@ -181,7 +181,7 @@ class OffCanvas extends BaseComponent {

static jQueryInterface(config) {
return this.each(function () {
const data = Data.getData(this, DATA_KEY) || new OffCanvas(this)
const data = Data.get(this, DATA_KEY) || new OffCanvas(this)

if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
Expand Down Expand Up @@ -224,7 +224,7 @@ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (
return
}

const data = Data.getData(target, DATA_KEY) || new OffCanvas(target)
const data = Data.get(target, DATA_KEY) || new OffCanvas(target)
data.toggle(this)
})

Expand Down

0 comments on commit d0a4cbb

Please sign in to comment.