Fix tests

This commit is contained in:
Pieter Vander Vennet 2024-08-29 12:28:59 +02:00
parent 0cb884cc87
commit eb3cb1ff7b

View file

@ -35,7 +35,7 @@ export default class ThemeViewStateHashActor {
const hashOnLoad = Hash.hash.data const hashOnLoad = Hash.hash.data
const containsMenu = this.loadStateFromHash(hashOnLoad) const containsMenu = this.loadStateFromHash(hashOnLoad)
// First of all, try to recover the selected element // First of all, try to recover the selected element
if (!containsMenu && hashOnLoad.length > 0) { if (!containsMenu && hashOnLoad?.length > 0) {
state.indexedFeatures.featuresById.addCallbackAndRunD(() => { state.indexedFeatures.featuresById.addCallbackAndRunD(() => {
// once that we have found a matching element, we can be sure the indexedFeaturesource was popuplated and that the job is done // once that we have found a matching element, we can be sure the indexedFeaturesource was popuplated and that the job is done
return this.loadSelectedElementFromHash(hashOnLoad) return this.loadSelectedElementFromHash(hashOnLoad)