diff --git a/jasmine/jasmine.headless-reporter.coffee b/jasmine/jasmine.headless-reporter.coffee index 8b6d383..75ea16b 100644 --- a/jasmine/jasmine.headless-reporter.coffee +++ b/jasmine/jasmine.headless-reporter.coffee @@ -25,7 +25,7 @@ jasmine.Spec.prototype.getJHWSpecInformation = -> parts.join("||") jasmine.Spec.prototype.fail = (e) -> - if e and window.CoffeeScriptToFilename + if e and e.sourceURL and window.CoffeeScriptToFilename filename = e.sourceURL.split('/').pop() if realFilename = window.CoffeeScriptToFilename[filename] e = { diff --git a/jasmine/jasmine.headless-reporter.js b/jasmine/jasmine.headless-reporter.js index c77f219..ab9dee7 100644 --- a/jasmine/jasmine.headless-reporter.js +++ b/jasmine/jasmine.headless-reporter.js @@ -28,7 +28,7 @@ }; jasmine.Spec.prototype.fail = function(e) { var expectationResult, filename, realFilename; - if (e && window.CoffeeScriptToFilename) { + if (e && e.sourceURL && window.CoffeeScriptToFilename) { filename = e.sourceURL.split('/').pop(); if (realFilename = window.CoffeeScriptToFilename[filename]) { e = {