mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-02 14:31:31 +01:00
@@ -77,6 +77,10 @@ function getProcessIdWithHighestProperty(processList, propertyName: string) {
|
||||
|
||||
function updateProcessInfo(processList): void {
|
||||
const target = document.getElementById('process-list');
|
||||
if (!target) {
|
||||
return;
|
||||
}
|
||||
|
||||
const highestCPUProcess = getProcessIdWithHighestProperty(processList, 'cpu');
|
||||
const highestMemoryProcess = getProcessIdWithHighestProperty(processList, 'memory');
|
||||
|
||||
@@ -127,7 +131,9 @@ function applyStyles(styles: ProcessExplorerStyles): void {
|
||||
}
|
||||
|
||||
styleTag.innerHTML = content.join('\n');
|
||||
document.head.appendChild(styleTag);
|
||||
if (document.head) {
|
||||
document.head.appendChild(styleTag);
|
||||
}
|
||||
document.body.style.color = styles.color;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user