Skip to content

Commit a06c1a3

Browse files
committed
guard against source rewrite on incorrect ports
1 parent bc9e11f commit a06c1a3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/plugins/handlers.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,8 @@ function handlers(app, opts, done){
514514
function selectDevice(device) {
515515
const { content } = workspace.getState();
516516

517-
if(!device.match) {
517+
// need to make sure we have all the information before rewriting the source
518+
if(!device.match && device.name && device.program) {
518519
const { name } = device;
519520
// TODO: handle unnamed device
520521
const { TargetStart } = device.program.raw;

0 commit comments

Comments
 (0)