Merge pull request #1063 from balena-io/1060-list-comp

Take order into account when comparing service config arrays
This commit is contained in:
CameronDiver 2019-08-16 09:18:13 +01:00 committed by GitHub
commit 37430124ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -689,10 +689,7 @@ export class Service {
sameConfig = sameConfig =
sameConfig && sameConfig &&
_.every(Service.configArrayFields, (field: keyof ServiceConfig) => { _.every(Service.configArrayFields, (field: keyof ServiceConfig) => {
const eq = _.isEqual( const eq = _.isEqual(this.config[field], service.config[field]);
_.sortBy(this.config[field] as unknown[]),
_.sortBy(service.config[field] as unknown[]),
);
if (!eq) { if (!eq) {
differentArrayFields.push(field); differentArrayFields.push(field);
} }