Skip to content

Commit

Permalink
Shorten the logic slightly with optional chaining.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasongrout committed Jan 24, 2020
1 parent 48d95f8 commit 9aecd51
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/help-extension/src/index.tsx
Expand Up @@ -197,11 +197,7 @@ function activate(
kernelConnectionOptions: { handleComms: false }
});

const kernel = session.kernel;
if (!kernel) {
return;
}
void kernel.info.then(kernelInfo => {
void session.kernel?.info.then(kernelInfo => {
const name = session.kernel!.name;

// Check the cache second time so that, if two callbacks get scheduled,
Expand Down

0 comments on commit 9aecd51

Please sign in to comment.