Skip to content

Commit 2bf5f87

Browse files
committed
fix environments updating global array
The environments plugin was changing `MergeDeep.NAME_FIELDS`, which is a global object. The reason was to avoid environments being filtered out from the change list if they only have a name field. However, the environments plugin has it's own overriden sync method, and thus we can simply drop the whole filtering from that method. Fixes #108
1 parent cba53e3 commit 2bf5f87

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/plugins/environments.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ module.exports = class Environments extends Diffable {
1717
}
1818
})
1919
}
20-
21-
// Remove 'name' from filtering list so Environments with only a name defined are processed.
22-
MergeDeep.NAME_FIELDS.splice(MergeDeep.NAME_FIELDS.indexOf('name'), 1)
23-
2420
}
2521

2622
async find() {
@@ -304,7 +300,7 @@ module.exports = class Environments extends Diffable {
304300
}
305301
}
306302
}
307-
filteredEntries = filteredEntries.filter(entry => Object.keys(entry).filter(key => !MergeDeep.NAME_FIELDS.includes(key)).length !== 0)
303+
// For environments, we want to keep the entries with only name defined.
308304

309305
const changes = []
310306

0 commit comments

Comments
 (0)