Skip to content

Commit

Permalink
Misc
Browse files Browse the repository at this point in the history
  • Loading branch information
DonJayamanne committed Mar 19, 2021
1 parent e0c21d6 commit e18ba58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client/datascience/jupyter/kernels/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,9 @@ export function findPreferredKernel(

// If still not found, look for a match based on notebook metadata and interpreter
if (index < 0) {
const hasLanguageInfo = notebookMetadata?.language_info?.name ? true : false;
const nbMetadataLanguage =
!notebookMetadata || isPythonNotebook(notebookMetadata)
!notebookMetadata || isPythonNotebook(notebookMetadata) || !hasLanguageInfo
? PYTHON_LANGUAGE
: (
(notebookMetadata?.kernelspec?.language as string) || notebookMetadata?.language_info?.name
Expand Down

0 comments on commit e18ba58

Please sign in to comment.