Fixed bug with crashing (issue #36) #43

Merged
merged 4 commits into from Dec 7, 2011

Projects

None yet

2 participants

@vtsvang
Contributor
vtsvang commented Dec 6, 2011

Fixed bug with empty comments var in lib/box.js

@tj tj and 1 other commented on an outdated diff Dec 7, 2011
@@ -40,8 +40,10 @@ exports.parseComments = function(js){
// code following previous comment
if (buf.trim().length) {
comment = comments[comments.length - 1];
- comment.code = code = buf.trim();
- comment.ctx = exports.parseCodeContext(code);
+ if(comment) {
+ comment.code = code = buf.trim();
+ comment.ctx = exports.parseCodeContext(code);
+ }
@tj
tj Dec 7, 2011 Owner

woah funky indentation batman

@vtsvang
vtsvang Dec 7, 2011 Contributor

Fixed, sorry for the number of commits :)

@tj
Owner
tj commented Dec 7, 2011

haha thanks :D

@tj tj merged commit 20216c7 into tj:master Dec 7, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment