diff --git a/src/App.jsx b/src/App.jsx
index fddd88727..c09fddf21 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -26,8 +26,8 @@ export const alex = {
export const App = () => (
);
diff --git a/src/components/Person/Person.jsx b/src/components/Person/Person.jsx
index 32953780a..6680209ff 100644
--- a/src/components/Person/Person.jsx
+++ b/src/components/Person/Person.jsx
@@ -1,8 +1,11 @@
export function Person({ person }) {
const { name, age, sex, isMarried, partnerName } = person;
+ let partnerText;
- const partnerText = `${partnerName} is my ${sex === 'f' ? 'husband' : 'wife'}`;
+ if (partnerName) {
+ partnerText = `${person.partnerName} is my ${sex === 'f' ? 'husband' : 'wife'}`;
+ }
return (