Skip to content

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
DonJayamanne committed Mar 20, 2024
1 parent 4806ff1 commit c426f54
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/platform/common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -476,9 +476,14 @@ export function useCustomMetadata() {
if (ext && typeof ext.exports.dropCustomMetadata === 'boolean') {
return ext.exports.dropCustomMetadata ? false : true;
}
// Means ipynb extension has not yet been activated.
// Does not matter, we can just check the setting.
return !workspace.getConfiguration('jupyter', undefined).get<boolean>('experimental.dropCustomMetadata', false);
try {
// Means ipynb extension has not yet been activated.
// Does not matter, we can just check the setting.
return !workspace.getConfiguration('jupyter', undefined).get<boolean>('experimental.dropCustomMetadata', false);
} catch {
// This happens in unit tests, in this case just return `true`.
return true;
}
}

export async function activateIPynbExtension() {
Expand Down

0 comments on commit c426f54

Please sign in to comment.