diff --git a/package.json b/package.json index 29f0bb1c..348b9964 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "datasync-filesystem-sdk", - "version": "1.0.3", + "version": "1.0.4", "description": "JavaScript filesystem SDK to query data synced via @contentstack/datasync-content-store-filesystem", "main": "dist/index.js", "scripts": { diff --git a/src/stack.ts b/src/stack.ts index f766f199..4ecf40bb 100755 --- a/src/stack.ts +++ b/src/stack.ts @@ -983,7 +983,7 @@ export class Stack { public except(fields) { if (fields && typeof fields === 'object' && fields instanceof Array && fields.length) { this.q.except = [] - const keys = Object.keys(this.contentStore.projections) + const keys = Object.keys(this.contentStore.projections).filter(key => this.contentStore.projections[key] === 0) this.q.except = keys.concat(fields) return this @@ -1189,7 +1189,7 @@ export class Stack { } if (!this.q.hasOwnProperty('except') && !this.q.hasOwnProperty('only')) { - const keys = Object.keys(this.contentStore.projections) + const keys = Object.keys(this.contentStore.projections).filter(key => this.contentStore.projections[key] === 0) this.q.except = keys }