From 6f543d97b473a9bc1629b731e9f5df7fdfcb4e5f Mon Sep 17 00:00:00 2001 From: Daniel Lautzenheiser Date: Wed, 21 Sep 2022 19:09:41 -0400 Subject: [PATCH] Do not consider first collection if it only has one file --- packages/netlify-cms-core/src/components/App/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/netlify-cms-core/src/components/App/App.js b/packages/netlify-cms-core/src/components/App/App.js index b7f14ae2..b3b4f3b5 100644 --- a/packages/netlify-cms-core/src/components/App/App.js +++ b/packages/netlify-cms-core/src/components/App/App.js @@ -64,7 +64,7 @@ const ErrorCodeBlock = styled.pre` `; function getDefaultPath(collections) { - const first = collections.filter(collection => collection.get('hide') !== true).first(); + const first = collections.filter(collection => collection.get('hide') !== true && (!collection.has('files') || collection.get('files').size > 1)).first(); if (first) { return `/collections/${first.get('name')}`; } else {