due to the fix for #547 backtrace is not always defined
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -194,7 +194,7 @@ var Casper = function Casper(options) { | ... | @@ -194,7 +194,7 @@ var Casper = function Casper(options) { |
194 | notices.forEach(function(notice) { | 194 | notices.forEach(function(notice) { |
195 | console.error(c.colorize(notice, 'COMMENT')); | 195 | console.error(c.colorize(notice, 'COMMENT')); |
196 | }); | 196 | }); |
197 | backtrace.forEach(function(item) { | 197 | (backtrace || []).forEach(function(item) { |
198 | var message = fs.absolute(item.file) + ":" + c.colorize(item.line, "COMMENT"); | 198 | var message = fs.absolute(item.file) + ":" + c.colorize(item.line, "COMMENT"); |
199 | if (item['function']) { | 199 | if (item['function']) { |
200 | message += " in " + c.colorize(item['function'], "PARAMETER"); | 200 | message += " in " + c.colorize(item['function'], "PARAMETER"); | ... | ... |
-
Please register or sign in to post a comment