Fix null pointer exception
This commit is contained in:
1 parent
b1b4da769f
commit
520d2ea4ee
1 file changed
+4
-2
+4
-2
@@ -70,12 +70,14 @@ export default class extends Controller {
|
|||||||
this.loadingValue = true
|
this.loadingValue = true
|
||||||
this.priceTableContainerTarget.innerHTML = ''
|
this.priceTableContainerTarget.innerHTML = ''
|
||||||
this.modeValue = 'prices'
|
this.modeValue = 'prices'
|
||||||
let paCode = this.getConfig().paCode
|
|
||||||
let dateUid = e.currentTarget.dataset.dateUid
|
let dateUid = e.currentTarget.dataset.dateUid
|
||||||
const data = new URLSearchParams({
|
const data = new URLSearchParams({
|
||||||
'tx_epproducts_ajax[date]': dateUid,
|
'tx_epproducts_ajax[date]': dateUid,
|
||||||
'tx_epproducts_ajax[paCode]': paCode,
|
|
||||||
})
|
})
|
||||||
|
let paCode = this.getConfig().paCode
|
||||||
|
if (paCode) {
|
||||||
|
data.append('tx_epproducts_ajax[paCode]', paCode)
|
||||||
|
}
|
||||||
fetch(this.pricetableUriValue, { method: 'POST', body: data })
|
fetch(this.pricetableUriValue, { method: 'POST', body: data })
|
||||||
.then(this.checkStatus)
|
.then(this.checkStatus)
|
||||||
.then(this.parseHTML)
|
.then(this.parseHTML)
|
||||||
|
|||||||
Reference in new issue
Block a user