X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/3e7d875df78b94d17251d811f891761dc8b67735..a22abdcf287306f6cf3805ed99a115d10155a4aa:/src/pages/DetailsPage.svelte

diff --git a/src/pages/DetailsPage.svelte b/src/pages/DetailsPage.svelte
index eef7f23..f824602 100644
--- a/src/pages/DetailsPage.svelte
+++ b/src/pages/DetailsPage.svelte
@@ -201,8 +201,7 @@
 
             <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}
