diff --git a/packages/netlify-cms-core/src/backend.js b/packages/netlify-cms-core/src/backend.js index e6d83354..72e48d3e 100644 --- a/packages/netlify-cms-core/src/backend.js +++ b/packages/netlify-cms-core/src/backend.js @@ -300,16 +300,17 @@ class Backend { } getEntry(collection, slug) { - return this.implementation - .getEntry(collection, slug, selectEntryPath(collection, slug)) - .then(loadedEntry => - this.entryWithFormat(collection, slug)( - createEntry(collection.get('name'), slug, loadedEntry.file.path, { - raw: loadedEntry.data, - label: loadedEntry.file.label, - }), - ), - ); + const path = selectEntryPath(collection, slug); + const files = collection.get('files'); + const label = files && files.find(f => f.get('file') === path).get('label'); + return this.implementation.getEntry(collection, slug, path).then(loadedEntry => + this.entryWithFormat(collection, slug)( + createEntry(collection.get('name'), slug, loadedEntry.file.path, { + raw: loadedEntry.data, + label, + }), + ), + ); } getMedia() {