Fix: Don't append paCode when null
This commit is contained in:
@@ -71,7 +71,7 @@ class BookingUrlUtility
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($paCode) {
|
if (null !== $paCode) {
|
||||||
$query['agenturcode'] = $paCode;
|
$query['agenturcode'] = $paCode;
|
||||||
} elseif ($bpnCookie) {
|
} elseif ($bpnCookie) {
|
||||||
$query['agenturcode'] = $bpnCookie;
|
$query['agenturcode'] = $bpnCookie;
|
||||||
|
|||||||
+4
@@ -53,7 +53,9 @@ export default class extends Controller {
|
|||||||
this.loadingValue = true
|
this.loadingValue = true
|
||||||
let paCode = this.getConfig().paCode
|
let paCode = this.getConfig().paCode
|
||||||
const data = new URLSearchParams()
|
const data = new URLSearchParams()
|
||||||
|
if (null !== paCode) {
|
||||||
data.append('pa', paCode)
|
data.append('pa', paCode)
|
||||||
|
}
|
||||||
this.datesTableContainerTarget.innerHTML = ''
|
this.datesTableContainerTarget.innerHTML = ''
|
||||||
fetch(`${this.datestableUriValue}&${data}`)
|
fetch(`${this.datestableUriValue}&${data}`)
|
||||||
.then(this.checkStatus)
|
.then(this.checkStatus)
|
||||||
@@ -73,7 +75,9 @@ export default class extends Controller {
|
|||||||
this.modeValue = 'prices'
|
this.modeValue = 'prices'
|
||||||
let paCode = this.getConfig().paCode
|
let paCode = this.getConfig().paCode
|
||||||
const data = new URLSearchParams()
|
const data = new URLSearchParams()
|
||||||
|
if (null !== paCode) {
|
||||||
data.append('pa', paCode)
|
data.append('pa', paCode)
|
||||||
|
}
|
||||||
fetch(`${params.pricesUrl}&${data}`)
|
fetch(`${params.pricesUrl}&${data}`)
|
||||||
.then(this.checkStatus)
|
.then(this.checkStatus)
|
||||||
.then(this.parseHTML)
|
.then(this.parseHTML)
|
||||||
|
|||||||
Reference in New Issue
Block a user