diff --git a/src/components/Person.vue b/src/components/Person.vue
index dd5e12bf..2ab6a4db 100644
--- a/src/components/Person.vue
+++ b/src/components/Person.vue
@@ -4,7 +4,7 @@
{{results.name}}
Biography
- - Homeworld: {{ results.homeworld }}
+ - Homeworld: {{ results.homeworld.name }}
- Birth year: {{ results.birth_year }}
- Height: {{ results.height }}
- Mass: {{ results.mass }}
diff --git a/src/store/people.js b/src/store/people.js
index 677713de..df5ffb0f 100644
--- a/src/store/people.js
+++ b/src/store/people.js
@@ -48,8 +48,9 @@ export default {
return response.json()
}
})
- const homeworld = await renderAttributeName(results.homeworld)
- results.homeworld = homeworld
+ const homeworldUrl = results.homeworld
+ const homeworld = await renderAttributeName(homeworldUrl)
+ results.homeworld = { 'name': homeworld, 'url': homeworldUrl }
const species = await renderAttributeName(results.species[0])
results.species = species