]> git.openstreetmap.org Git - nominatim-ui.git/blobdiff - src/pages/DetailsPage.svelte
hierarchy in details response is hash, not array (#156)
[nominatim-ui.git] / src / pages / DetailsPage.svelte
index eef7f2393e0eeacba12ca5e8081992d8e3e8ad6d..f824602bb732b3afd78331b9de5c259baaade800 100644 (file)
 
             <tr class="all-columns"><td colspan="6"><h2>Parent Of</h2></td></tr>
             {#if api_request_params.hierarchy}
-              {#if aPlace.hierarchy && aPlace.hierarchy.length}
-
+              {#if aPlace.hierarchy && typeof (aPlace.hierarchy) === 'object' && Object.keys(aPlace.hierarchy).length}
                 {#each Object.keys(aPlace.hierarchy) as type}
                   <tr class="all-columns"><td colspan="6"><h3>{type}</h3></td></tr>
                   {#each aPlace.hierarchy[type] as line}