Skip to content

Commit

Permalink
fix(sync): quick fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alonp99 committed Aug 5, 2024
1 parent 238f93d commit e84a18a
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ export const mergeSyncObjects = (relevantObjects: SyncedObject[]): Record<string
return acc;
}
const sharedEnvironments = obj.syncedEnvironments.filter((env: any) =>
acc[key]?.syncedEnvironments.includes(env),
acc[key]?.syncedEnvironments?.includes(env),
);
const sharedDryRunEnvironments = obj.dryRunEnvironments.filter((env: any) =>
acc[key]?.dryRunEnvironments.includes(env),
acc[key]?.dryRunEnvironments?.includes(env),
);

if (sharedEnvironments.length === 0 && sharedDryRunEnvironments.length === 0) {
Expand Down Expand Up @@ -97,8 +97,8 @@ export const sync = async (objectsToSync: SyncedObject[]) => {
// Filter objects that are relevant for the current environment
const relevantObjects = objectsToSync.filter(
obj =>
obj.syncedEnvironments.includes(environmentName) ||
obj.dryRunEnvironments.includes(environmentName),
obj.syncedEnvironments?.includes(environmentName) ||
obj.dryRunEnvironments?.includes(environmentName),
);

const mergedObjects = mergeSyncObjects(relevantObjects);
Expand Down

0 comments on commit e84a18a

Please sign in to comment.