Code: Alles auswählen
Huch, da ist die Anwendung leider abgestürzt.
TypeError: Cannot read properties of undefined (reading 'localeCompare')
Wenn sich das wiederholen lässt, kannst Du der Entwicklung helfen mit einem Hinweis auf den Fehler.
Aufrufhistorie
TypeError: Cannot read properties of undefined (reading 'localeCompare')
at Object.getSeatTypeText (https://arv-efa.de/js_23/oBoat.js:163:33)
at https://arv-efa.de/js_23/bPanel.js:167:29
at Array.forEach ()
at Object.listAvailableBoats (https://arv-efa.de/js_23/bPanel.js:166:15)
at Object.update (https://arv-efa.de/js_23/bPanel.js:292:35)
at Object._refreshList (https://arv-efa.de/js_23/cLists.js:548:12)
at Object.updateList (https://arv-efa.de/js_23/cLists.js:311:9)
at Object.list_resp (https://arv-efa.de/js_23/cTxHandler.js:119:10)
at Object.handleResponse (https://arv-efa.de/js_23/cTxQueue.js:488:26)
at postRequest.onload (https://arv-efa.de/js_23/cTxQueue.js:351:14)
Fix
Zeilen 163 und 182 erweitert um "bTypeCoxed !== undefined && "
Code: Alles auswählen
/**
* Get the correct seat type text description
*/
getSeatTypeText : function(boatRecord, boatVariantIndex) {
var bTypeSeats = boatRecord["TypeSeats"].split(/;/g);
var bTypeCoxed = boatRecord["TypeCoxing"].split(/;/g);
var seatTypeText = "";
for (var i = 0; i < bTypeSeats.length; i++) {
var withCox = (bTypeCoxed[i] !== undefined && bTypeCoxed[i].localeCompare("COXED") == 0) ? " mit"
: "";
if ($_efaTypes && $_efaTypes["NUMSEATS"]
&& $_efaTypes["NUMSEATS"][bTypeSeats[i]])
seatTypeText += $_efaTypes["NUMSEATS"][bTypeSeats[i]] + withCox
+ ", ";
}
seatTypeText = seatTypeText.substring(0, seatTypeText.length - 2);
return seatTypeText;
},
/**
* Get the correct seat type text description
*/
getSeatTypeShort : function(boatRecord, boatVariantIndex) {
var bTypeSeats = boatRecord["TypeSeats"].split(/;/g);
var bTypeCoxed = boatRecord["TypeCoxing"].split(/;/g);
var seatTypeShort = "";
for (var i = 0; i < bTypeSeats.length; i++) {
seatTypeShort += bTypeSeats[i] + ((bTypeCoxed[i] !== undefined && bTypeCoxed[i].localeCompare("COXED") == 0) ? "m"
: "") + ",";
}
seatTypeShort = seatTypeShort.substring(0, seatTypeShort.length - 1);
return seatTypeShort;
},