From 2c8e8bece043120580691aa1f0085ab99c166062 Mon Sep 17 00:00:00 2001 From: Caleb Date: Mon, 18 Sep 2017 08:27:49 -0600 Subject: [PATCH] Fix collections breaking if folder has trailing slash. --- src/reducers/collections.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reducers/collections.js b/src/reducers/collections.js index aa9860b8..2f5c5873 100644 --- a/src/reducers/collections.js +++ b/src/reducers/collections.js @@ -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(/\.[^\.]+$/, '');