check that e.sourceURL is available before using it

This commit is contained in:
John Bintz 2011-09-26 18:42:38 -04:00
parent 04e2bc5f22
commit c1dc86a329
2 changed files with 2 additions and 2 deletions

View File

@ -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 = {

View File

@ -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 = {