Don't allow negative numbers in view badges (#162359)

This commit is contained in:
Alex Ross 2022-09-29 17:04:43 +02:00 committed by GitHub
parent f1d4fced59
commit 112a03b39b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -124,7 +124,7 @@ export class ExtHostTreeViews implements ExtHostTreeViewsShape {
set badge(badge: vscode.ViewBadge | undefined) {
if (ExtHostViewBadge.isViewBadge(badge)) {
treeView.badge = {
value: Math.floor(badge.value),
value: Math.floor(Math.abs(badge.value)),
tooltip: badge.tooltip
};
}