Skip to content

Commit b753d33

Browse files
authored
Avoid tweaking command arguments when they are already provided by extensions (microsoft#161154)
1 parent a10bdfb commit b753d33

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,9 @@ class CellStatusBarItem extends Disposable {
313313
const id = typeof command === 'string' ? command : command.id;
314314
const args = typeof command === 'string' ? [] : command.arguments ?? [];
315315

316-
args.unshift(this._context);
316+
if (typeof command === 'string' || !command.arguments || !Array.isArray(command.arguments) || command.arguments.length === 0) {
317+
args.unshift(this._context);
318+
}
317319

318320
this._telemetryService.publicLog2<WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification>('workbenchActionExecuted', { id, from: 'cell status bar' });
319321
try {

0 commit comments

Comments
 (0)