[BUGFIX] js errors
This commit is contained in:
		| @@ -20,6 +20,8 @@ document.addEventListener('DOMContentLoaded', function() { | |||||||
|  |  | ||||||
| function selectBoatChange() { | function selectBoatChange() { | ||||||
|   const boatSelect = <HTMLSelectElement>document.querySelector('#boat_id'); |   const boatSelect = <HTMLSelectElement>document.querySelector('#boat_id'); | ||||||
|  |  | ||||||
|  |   if(boatSelect) { | ||||||
|     const boatChoice = new Choices(boatSelect, { |     const boatChoice = new Choices(boatSelect, { | ||||||
|       loadingText: 'Wird geladen...', |       loadingText: 'Wird geladen...', | ||||||
|       noResultsText: 'Keine Ergebnisse gefunden', |       noResultsText: 'Keine Ergebnisse gefunden', | ||||||
| @@ -50,8 +52,10 @@ function selectBoatChange() { | |||||||
|     } as any); |     } as any); | ||||||
|    |    | ||||||
|     choiceObjects[boatSelect.id] = boatChoice; |     choiceObjects[boatSelect.id] = boatChoice; | ||||||
|  |   } | ||||||
|  |  | ||||||
|   const shipmasterSelect = <HTMLSelectElement>document.querySelector('#shipmaster'); |   const shipmasterSelect = <HTMLSelectElement>document.querySelector('#shipmaster'); | ||||||
|  |   if(shipmasterSelect) { | ||||||
|     const shipmasterChoice = new Choices(shipmasterSelect, { |     const shipmasterChoice = new Choices(shipmasterSelect, { | ||||||
|       loadingText: 'Wird geladen...', |       loadingText: 'Wird geladen...', | ||||||
|       noResultsText: 'Keine Ergebnisse gefunden', |       noResultsText: 'Keine Ergebnisse gefunden', | ||||||
| @@ -60,6 +64,7 @@ function selectBoatChange() { | |||||||
|     }); |     }); | ||||||
|      |      | ||||||
|     choiceObjects[shipmasterSelect.id] = shipmasterChoice; |     choiceObjects[shipmasterSelect.id] = shipmasterChoice; | ||||||
|  |   } | ||||||
| } | } | ||||||
|  |  | ||||||
| function setMaxAmountRowers(rowers: number){ | function setMaxAmountRowers(rowers: number){ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Marie Birner
					Marie Birner