We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8448c37 commit e7ad7f1Copy full SHA for e7ad7f1
src/modules/extendedBuilding/assets/schoolsBuildingFilter.ts
@@ -8,10 +8,21 @@ interface BuildingInfos {
8
}
9
10
export default async (LSSM: Vue) => {
11
- const accordion = document.querySelector<HTMLDivElement>(
12
- 'form[action$="/education"] #accordion'
13
- );
+ const getAccordion = () =>
+ document.querySelector<HTMLDivElement>(
+ 'form[action$="/education"] #accordion'
14
+ );
15
16
+ // wait for Ausbildungs-Mausschoner to append buildings
17
+ if (!getAccordion()) {
18
+ await new Promise(resolve =>
19
+ document.addEventListener(
20
+ 'ausbildungs-mausschoner:buildings-appended',
21
+ resolve
22
+ )
23
24
+ }
25
+ const accordion = getAccordion();
26
if (!accordion) return;
27
28
await LSSM.$stores.api.getBuildings('eb-sbf');
0 commit comments