Skip to content

Commit 53e5225

Browse files
committed
fix getPrebuildSettings
1 parent 11b6d0c commit 53e5225

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

components/gitpod-protocol/src/teams-projects-protocol.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,15 @@ export namespace Project {
122122
* contain default values for properties which are not set explicitly for this project.
123123
*/
124124
export function getPrebuildSettings(project: Project): PrebuildSettingsWithDefaults {
125-
const effective = {
125+
// ignoring persisted properties with `undefined` values to exclude them from the override.
126+
const overrides = Object.fromEntries(
127+
Object.entries(project.settings?.prebuilds ?? {}).filter(([_, value]) => value !== undefined),
128+
);
129+
130+
return {
126131
...PREBUILD_SETTINGS_DEFAULTS,
127-
...project.settings?.prebuilds,
132+
...overrides,
128133
};
129-
return effective;
130134
}
131135

132136
export function hasPrebuildSettings(project: Project) {

0 commit comments

Comments
 (0)