From 92b0397d78c8b3122c0ae45cefad57ca68641537 Mon Sep 17 00:00:00 2001
From: Paolo Furini
Date: Sat, 30 Apr 2016 21:16:51 +0000
Subject: [PATCH] Fix issue #8 - dehidrate() called once at the end of
full_dehidrate
---
lib/resource/index.js | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/resource/index.js b/lib/resource/index.js
index 49ab850..f234050 100644
--- a/lib/resource/index.js
+++ b/lib/resource/index.js
@@ -620,11 +620,10 @@ Resource = new Class({
ret[field] = method.call(that, obj, bundle, ret );
}
- dehydrate( ret );
return cb && cb( err );
});
}, function( err ){
- done( err, ret );
+ done( err, dehydrate( ret ) );
});
}