From c1dc86a329bbc416ace59ccfdbcd2bfa2afa4edd Mon Sep 17 00:00:00 2001 From: John Bintz Date: Mon, 26 Sep 2011 18:42:38 -0400 Subject: [PATCH] check that e.sourceURL is available before using it --- jasmine/jasmine.headless-reporter.coffee | 2 +- jasmine/jasmine.headless-reporter.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 = {