Skip to content

Commit 48b91cc

Browse files
committed
Add comments
1 parent 69693d2 commit 48b91cc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/client/datascience/plotting/plotViewer.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import { traceError } from '../../common/logger';
1717
import { IFileSystem } from '../../common/platform/types';
1818
import { IConfigurationService, IDisposable, IExperimentsManager, Resource } from '../../common/types';
1919
import * as localize from '../../common/utils/localize';
20-
import { noop } from '../../common/utils/misc';
2120
import { ICodeCssGenerator, IPlotViewer, IThemeFinder } from '../types';
2221
import { WebViewHost } from '../webViewHost';
2322
import { PlotViewerMessageListener } from './plotViewerMessageListener';
@@ -166,7 +165,9 @@ export class PlotViewer extends WebViewHost<IPlotViewerMapping> implements IPlot
166165
// tslint:disable-next-line: no-require-imports
167166
const pdfkit = require('pdfkit') as typeof import('pdfkit');
168167

169-
const dimensions = await getSVGDimensions(payload.svg).catch(noop);
168+
const dimensions = await getSVGDimensions(payload.svg).catch(ex =>
169+
traceError('Failed to get dimensions of SVG', ex)
170+
);
170171
const options: Record<string, {}> = {};
171172
if (dimensions && dimensions.width && dimensions.height) {
172173
const LetterSize = { width: 612, height: 792.0 }; //https://github.com/foliojs/pdfkit/blob/master/lib/page.js#L62

0 commit comments

Comments
 (0)