Fix null pointer exception
This commit is contained in:
+4
-2
@@ -70,12 +70,14 @@ export default class extends Controller {
|
||||
this.loadingValue = true
|
||||
this.priceTableContainerTarget.innerHTML = ''
|
||||
this.modeValue = 'prices'
|
||||
let paCode = this.getConfig().paCode
|
||||
let dateUid = e.currentTarget.dataset.dateUid
|
||||
const data = new URLSearchParams({
|
||||
'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 })
|
||||
.then(this.checkStatus)
|
||||
.then(this.parseHTML)
|
||||
|
||||
Reference in New Issue
Block a user