Update PrettyPrinter to better check for an Object

Includes test case to fix FF as suggested by @ondras
Fixes #409
This commit is contained in:
Sheel Choksi
2013-08-03 11:49:20 -07:00
parent 4c4317b80e
commit 0f42f2709a
3 changed files with 9 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ getJasmineRequireObj().pp = function(j$) {
this.emitScalar('Date(' + value + ')');
} else if (value.__Jasmine_been_here_before__) {
this.emitScalar('<circular reference: ' + (j$.isArray_(value) ? 'Array' : 'Object') + '>');
} else if (j$.isArray_(value) || typeof value == 'object') {
} else if (j$.isArray_(value) || j$.isA_('Object', value)) {
value.__Jasmine_been_here_before__ = true;
if (j$.isArray_(value)) {
this.emitArray(value);