Permalink
Browse files

style

  • Loading branch information...
1 parent 5e82940 commit 0494d4e4e57ed155e2dc728674e2731fb50b4abc @aheckmann aheckmann committed Feb 2, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/utils.js
View
@@ -227,11 +227,13 @@ var clone = exports.clone = function clone (obj, options) {
if (Array.isArray(obj))
return cloneArray(obj, options);
- if (isMongooseObject(obj))
- if (options && options.json && 'function' === typeof obj.toJSON)
+ if (isMongooseObject(obj)) {
+ if (options && options.json && 'function' === typeof obj.toJSON) {
return obj.toJSON(options);
- else
+ } else {
return obj.toObject(options);
+ }
+ }
if ('Object' === obj.constructor.name)
return cloneObject(obj, options);

0 comments on commit 0494d4e

Please sign in to comment.