提交 8795a9d6 编写于 作者: B Benjamin Pasero

avoid "NanTB" (for #50103)

上级 fc251d65
......@@ -225,7 +225,7 @@ class FileSeemsBinaryFileView {
}
if (metadataClb) {
metadataClb(BinarySize.formatSize(descriptor.size));
metadataClb(typeof descriptor.size === 'number' ? BinarySize.formatSize(descriptor.size) : '');
}
scrollbar.scanDomNode();
......@@ -543,7 +543,14 @@ class InlineImageView {
image.style.visibility = 'hidden';
disposables.push(DOM.addDisposableListener(image, DOM.EventType.LOAD, e => {
let metadata: string;
if (typeof descriptor.size === 'number') {
metadataClb(nls.localize('imgMeta', '{0}x{1} {2}', image.naturalWidth, image.naturalHeight, BinarySize.formatSize(descriptor.size)));
} else {
metadataClb(nls.localize('imgMetaNoSize', '{0}x{1}', image.naturalWidth, image.naturalHeight));
}
metadataClb(metadata);
scrollbar.scanDomNode();
image.style.visibility = 'visible';
updateScale(scale);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册