Limit depth to 1 when outputting data objects

This prevents descending into the global object cache that's accessible
from every data object.
This commit is contained in:
Dan Stillman 2017-01-17 02:58:47 -05:00
parent 1cf2585b41
commit 33deefbf74

View file

@ -1386,6 +1386,11 @@ Zotero.Utilities = {
return '<<Unknown type: ' + type + '>> ' + obj;
}
// Don't descend into global object cache for data objects
if (Zotero.isClient && typeof obj == 'object' && obj instanceof Zotero.DataObject) {
maxLevel = 1;
}
// More complex dump with indentation for objects
if (level === undefined) {
level = 0;