@@ -772,11 +772,9 @@ Backend.prototype._fetchSnapshot = function(collection, id, version, callback) {
772
772
var db = this . db ;
773
773
var backend = this ;
774
774
775
- var options = { metadata : true } ;
776
- var fields = null ;
777
775
var shouldGetLatestSnapshot = version === null ;
778
776
if ( shouldGetLatestSnapshot ) {
779
- return backend . db . getSnapshot ( collection , id , fields , options , function ( error , snapshot ) {
777
+ return backend . db . getSnapshot ( collection , id , null , null , function ( error , snapshot ) {
780
778
if ( error ) return callback ( error ) ;
781
779
782
780
callback ( null , snapshot ) ;
@@ -791,7 +789,7 @@ Backend.prototype._fetchSnapshot = function(collection, id, version, callback) {
791
789
// - we want to avoid the 'op' middleware, because we later use the 'readSnapshots' middleware in _sanitizeSnapshots
792
790
// - we handle the projection in _sanitizeSnapshots
793
791
var from = milestoneSnapshot ? milestoneSnapshot . v : 0 ;
794
- db . getOps ( collection , id , from , version , options , function ( error , ops ) {
792
+ db . getOps ( collection , id , from , version , null , function ( error , ops ) {
795
793
if ( error ) return callback ( error ) ;
796
794
797
795
backend . _buildSnapshotFromOps ( id , milestoneSnapshot , ops , function ( error , snapshot ) {
@@ -845,12 +843,9 @@ Backend.prototype._fetchSnapshotByTimestamp = function(collection, id, timestamp
845
843
var from = 0 ;
846
844
var to = null ;
847
845
848
- var options = { metadata : true } ;
849
- var fields = null ;
850
-
851
846
var shouldGetLatestSnapshot = timestamp === null ;
852
847
if ( shouldGetLatestSnapshot ) {
853
- return backend . db . getSnapshot ( collection , id , fields , options , function ( error , snapshot ) {
848
+ return backend . db . getSnapshot ( collection , id , null , null , function ( error , snapshot ) {
854
849
if ( error ) return callback ( error ) ;
855
850
856
851
callback ( null , snapshot ) ;
@@ -866,6 +861,7 @@ Backend.prototype._fetchSnapshotByTimestamp = function(collection, id, timestamp
866
861
if ( error ) return callback ( error ) ;
867
862
if ( snapshot ) to = snapshot . v ;
868
863
864
+ var options = { metadata : true } ;
869
865
db . getOps ( collection , id , from , to , options , function ( error , ops ) {
870
866
if ( error ) return callback ( error ) ;
871
867
filterOpsInPlaceBeforeTimestamp ( ops , timestamp ) ;
0 commit comments