diff --git a/client/src/components/Draftail/decorators/Document.js b/client/src/components/Draftail/decorators/Document.js index f6d17181cb..afade79d33 100644 --- a/client/src/components/Draftail/decorators/Document.js +++ b/client/src/components/Draftail/decorators/Document.js @@ -9,14 +9,14 @@ const documentIcon = ; const Document = props => { const { entityKey, contentState } = props; - const { url, filename } = contentState.getEntity(entityKey).getData(); + const data = contentState.getEntity(entityKey).getData(); return ( ); }; diff --git a/client/src/components/Draftail/decorators/Document.test.js b/client/src/components/Draftail/decorators/Document.test.js index 0f8101c65c..c69c269d8b 100644 --- a/client/src/components/Draftail/decorators/Document.test.js +++ b/client/src/components/Draftail/decorators/Document.test.js @@ -12,6 +12,7 @@ describe('Document', () => { type: 'DOCUMENT', data: { url: '/example.pdf', + filename: 'example.pdf', }, } },