Page / Route
Other
Selected Location
Water Project / Waterbody dashboard (where getWaterbodyData is called)
Bug Description
In src/actions/getWaterbodyData.jsx, the function calls waitForFeatures(...) to wait for vector features (waterbody, MWS, ZOI). However, waitForFeatures is defined later in the function body using a const declaration. This can trigger a runtime error (ReferenceError / TDZ) and break the data-loading flow.
Steps to Reproduce
- Open the Water Project / Waterbody dashboard.
- Select State, District, and Tehsil.
- Choose/apply the relevant waterbody selection so getWaterbodyData runs.
- Observe that the dashboard fails to load or errors in the console (especially when vector features aren’t immediately available).
Expected Behavior
getWaterbodyData should reliably wait for vector source features and return wb/mws/zoi data without throwing runtime errors.
Filters Applied
Any active filter/pattern selections used to load the waterbody view.
Screenshots / Logs
No response
Browser
None
Page / Route
Other
Selected Location
Water Project / Waterbody dashboard (where getWaterbodyData is called)
Bug Description
In src/actions/getWaterbodyData.jsx, the function calls waitForFeatures(...) to wait for vector features (waterbody, MWS, ZOI). However, waitForFeatures is defined later in the function body using a const declaration. This can trigger a runtime error (ReferenceError / TDZ) and break the data-loading flow.
Steps to Reproduce
Expected Behavior
getWaterbodyData should reliably wait for vector source features and return wb/mws/zoi data without throwing runtime errors.
Filters Applied
Any active filter/pattern selections used to load the waterbody view.
Screenshots / Logs
No response
Browser
None