Make the check for pending spec exception work for values that don't have toString

This commit is contained in:
Sheel Choksi
2014-01-04 23:08:21 -08:00
parent f576395620
commit b525313cdb
3 changed files with 6 additions and 2 deletions

View File

@@ -141,7 +141,7 @@ getJasmineRequireObj().Spec = function(j$) {
Spec.pendingSpecExceptionMessage = "=> marked Pending";
Spec.isPendingSpecException = function(e) {
return e.toString().indexOf(Spec.pendingSpecExceptionMessage) !== -1;
return !!(e && e.toString && e.toString().indexOf(Spec.pendingSpecExceptionMessage) !== -1);
};
return Spec;