Fix collections breaking if folder has trailing slash.
This commit is contained in:
parent
37d4330370
commit
2c8e8bece0
@ -42,7 +42,7 @@ const selectors = {
|
||||
return collection.get('fields');
|
||||
},
|
||||
entryPath(collection, slug) {
|
||||
return `${ collection.get('folder') }/${ slug }.${ this.entryExtension(collection) }`;
|
||||
return `${ collection.get('folder').replace(/\/$/, '') }/${ slug }.${ this.entryExtension(collection) }`;
|
||||
},
|
||||
entrySlug(collection, path) {
|
||||
return path.split('/').pop().replace(/\.[^\.]+$/, '');
|
||||
|
Loading…
x
Reference in New Issue
Block a user