Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Console requires some null checking #1468

Merged
merged 1 commit into from

2 participants

@janjongboom

It's a bit sloppy, found out when working on deployments. @sergi @zefhemel @fjakobs

@zefhemel zefhemel merged commit e37de5c into master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 10, 2012
  1. @janjongboom
This page is out of date. Refresh to see the latest.
Showing with 8 additions and 4 deletions.
  1. +8 −4 plugins-client/ext.console/console.js
View
12 plugins-client/ext.console/console.js
@@ -327,7 +327,11 @@ module.exports = ext.register("ext/console/console", {
break;
default:
if (message.type.match(/-start$/)) {
- var command_id = extra.command_id;
+ var command_id = extra && extra.command_id;
+
+ if (!command_id) {
+ return;
+ }
this.tracerToPidMap[command_id] = message.pid;
this.pidToTracerMap[message.pid] = command_id;
@@ -340,8 +344,8 @@ module.exports = ext.register("ext/console/console", {
if (message.type.match(/-data$/)) {
var type = "tracer";
- var id = extra.command_id;
- if (!command_id) {
+ var id = extra && extra.command_id;
+ if (!id) {
type = "pid";
id = message.pid;
}
@@ -352,7 +356,7 @@ module.exports = ext.register("ext/console/console", {
}
if (message.type.match(/-exit$/)) {
- if (extra.command_id)
+ if (extra && extra.command_id)
this.markProcessAsCompleted(extra.command_id);
else
this.markProcessAsCompleted(message.pid, true);
Something went wrong with that request. Please try again.