Skip to content

Fix: Make search work on first page load

Jamie Tanna requested to merge defect/search into master

Previously, if loading the /search page on your first visit, the LunrJS feed would attempt to render the search with the value of feed = undefined, which threw an error. In this time, however, we also had the feed being updated. If a user refreshed their page, this would then be set on the next visit, unblocking them. However, this isn't the best user experience!

Instead, we can now update the feed in a blocking way, using await, so we know the feed will always be set by the time LunrJS is attempting to render it.

This also updates the last updated timestamp to the user, so they know it's fresh data.

Closes #624 (closed).

Merge request reports