File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 33var utils = require ( './pouch-utils' ) ;
44var wrappers = require ( 'pouchdb-wrappers' ) ;
55
6- function isUntransformable ( doc ) {
6+ function isUntransformable ( doc , config ) {
77 var isLocal = typeof doc . _id === 'string' && utils . isLocalId ( doc . _id ) ;
8- return isLocal || doc . _deleted ;
8+ return isLocal || doc . _deleted ? ! config . handleDeleted : false ;
99}
1010
1111// api.filter provided for backwards compat with the old "filter-pouch"
1212exports . transform = exports . filter = function transform ( config ) {
1313 var db = this ;
1414
1515 var incoming = function ( doc ) {
16- if ( ! isUntransformable ( doc ) && config . incoming ) {
16+ if ( ! isUntransformable ( doc , config ) && config . incoming ) {
1717 return config . incoming ( utils . clone ( doc ) ) ;
1818 }
1919 return doc ;
2020 } ;
2121 var outgoing = function ( doc ) {
22- if ( ! isUntransformable ( doc ) && config . outgoing ) {
22+ if ( ! isUntransformable ( doc , config ) && config . outgoing ) {
2323 return config . outgoing ( utils . clone ( doc ) ) ;
2424 }
2525 return doc ;
You can’t perform that action at this time.
0 commit comments