for numeric registrations shorter than 5 digits only query by hex

This commit is contained in:
Matthias Wirth
2021-04-01 22:15:39 +02:00
parent 4d6b425f48
commit c7334d99b8

View File

@@ -2144,7 +2144,7 @@ function refreshPhoto(selected) {
}
let urlTail;
let param;
if (selected.registration != null) {
if (selected.registration != null && !(selected.registration.length <= 4 && selected.registration.match(/^[0-9]*$/))) {
urlTail = '/hex/' + selected.icao.toUpperCase() + '?reg=' + selected.registration;
if (selected.icaoType) {
urlTail += '&icaoType=' + selected.icaoType;