File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed
Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ export function register(ctx: WorkspaceContext): vscode.Disposable[] {
150150 ) ,
151151 vscode . commands . registerCommand ( Commands . PLAY , async target => {
152152 const folder = ctx . currentFolder ;
153- if ( ! folder ) {
153+ if ( ! folder || ! target ) {
154154 return false ;
155155 }
156156 return await runPlayground ( folder , ctx . tasks , target ) ;
Original file line number Diff line number Diff line change @@ -38,11 +38,8 @@ export interface WorkspacePlaygroundItem extends PlaygroundItem {
3838export async function runPlayground (
3939 folderContext : FolderContext ,
4040 tasks : TaskManager ,
41- item ? : PlaygroundItem
41+ item : PlaygroundItem
4242) {
43- if ( ! item ) {
44- return false ;
45- }
4643 const id = item . label ?? item . id ;
4744 const task = createSwiftTask (
4845 [ "play" , id ] ,
You can’t perform that action at this time.
0 commit comments