Skip to content

Commit

Permalink
fix: body.dataSet from document (not target)
Browse files Browse the repository at this point in the history
  • Loading branch information
theus77 committed Feb 19, 2024
1 parent bd06da1 commit 9d7ea45
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions EMS/admin-ui-bundle/assets/js/core/plugins/mediaLibrary.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ import Component from '../components/mediaLibrary'
class MediaLibrary {
constructor () {
this.components = []
this.bodyData = document.querySelector('body').dataset
}

load (target) {
const elements = target.getElementsByClassName('media-lib')
const bodyData = target.querySelector('body').dataset
const self = this;

[].forEach.call(elements, function (el) {
self.components.push(new Component(el, {
urlMediaLib: '/component/media-lib',
urlInitUpload: bodyData.initUpload,
hashAlgo: bodyData.hashAlgo
urlInitUpload: this.bodyData.initUpload,
hashAlgo: this.bodyData.hashAlgo
}))
})
}
Expand Down

0 comments on commit 9d7ea45

Please sign in to comment.