Skip to content

Commit

Permalink
Fix: The array may contain null entries
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Gnass committed Nov 1, 2010
1 parent d106a5e commit 3bc680a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Support/jslint.js
Expand Up @@ -11,6 +11,7 @@ input = input.replace(/^\#\!.*/, "");
Script.runInThisContext(fs.readFileSync(__dirname + '/fulljslint.js', 'utf8'));

var success = JSLINT(input, {
es5: true,
predef: [
// CommonJS
"exports",
Expand All @@ -27,10 +28,12 @@ var success = JSLINT(input, {
if (!success) {
var body = '';
JSLINT.errors.forEach(function(e) {
body += ('<a href="txmt://open?url=file://' + escape(file) + '&line=' + e.line + '&column=' + e.character + '">' + e.reason);
if (e.evidence) {
//TODO highlight column
body += '<pre>' + (e.evidence || '') + '</pre></a>';
if (e) {
body += ('<a href="txmt://open?url=file://' + escape(file) + '&line=' + e.line + '&column=' + e.character + '">' + e.reason);
if (e.evidence) {
//TODO highlight column
body += '<pre>' + (e.evidence || '') + '</pre></a>';
}
}
});
fs.readFile(__dirname + '/output.html', 'utf8', function(e, html) {
Expand Down

0 comments on commit 3bc680a

Please sign in to comment.