Skip to content
This repository was archived by the owner on Mar 10, 2025. It is now read-only.

Commit aaa42a4

Browse files
committed
returning original object if no changes
1 parent 7d71be6 commit aaa42a4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/sieve.js

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ Sieve.prototype.toJSON = function () {
3434
}
3535

3636
Sieve.prototype.apply = function (obj) {
37+
if (!this._paths.include.length && !this._paths.exclude.length) {
38+
return obj
39+
}
3740
const delta = new Delta()
3841
const includePaths = this._paths.include.length ? this._paths.include : ['*']
3942
for (const pathEpression of includePaths) {

0 commit comments

Comments
 (0)