Skip to content

Commit

Permalink
Fix notebook-renderers compile error (microsoft#179506)
Browse files Browse the repository at this point in the history
  • Loading branch information
rzhao271 authored Apr 10, 2023
1 parent 7f03ec6 commit 8e89509
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion extensions/notebook-renderers/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,10 @@ function findScrolledHeight(scrollableElement: HTMLElement): number | undefined
}

function scrollingEnabled(output: OutputItem, options: RenderOptions) {
return output.metadata?.scrollable !== undefined ? output.metadata?.scrollable : options.outputScrolling;
const metadata = output.metadata;
return (typeof metadata === 'object' && metadata
&& 'scrollable' in metadata && typeof metadata.scrollable === 'boolean') ?
metadata.scrollable : options.outputScrolling;
}

function renderStream(outputInfo: OutputItem, outputElement: HTMLElement, error: boolean, ctx: IRichRenderContext): IDisposable {
Expand Down

0 comments on commit 8e89509

Please sign in to comment.