File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -295,12 +295,11 @@ export const useStudio = () => {
295
295
case 'nuxt-studio:editor:file-selected' : {
296
296
const content = await findContentWithId ( payload . path )
297
297
if ( ! content ) {
298
- // DO not navigate to another page if content is not found
299
- // This makes sure that user stays on the same page when navigation through directories in the editor
300
- }
301
- else if ( content . _partial ) {
302
- // Partials should use as helpers for other content files, like `_dir.yml`
303
- // We should not navigate if content is a partial
298
+ // Do not navigate to another page if content is not found
299
+ // This makes sure that user stays on the same page when navigation through directories in the editor
300
+ } else if ( content . _partial || ! String ( payload . path ) . endsWith ( '.md' ) ) {
301
+ // Partials and non-markdown files should use as helpers for other content files, like `_dir.yml`
302
+ // We should not navigate if content is a partial or non-markdown file
304
303
}
305
304
else if ( content . _path !== useRoute ( ) . path ) {
306
305
editorSelectedPath . value = content . _path !
You can’t perform that action at this time.
0 commit comments