diff --git a/code/extensions/che-remote/src/extension.ts b/code/extensions/che-remote/src/extension.ts index 4a273260b98..958451ab8c4 100644 --- a/code/extensions/che-remote/src/extension.ts +++ b/code/extensions/che-remote/src/extension.ts @@ -233,7 +233,13 @@ async function updateDevfile(cheApi: any): Promise { try { // keep spec.template.attributes if (!devfileContext.devWorkspace.spec!.template!.attributes) { - devfileContext.devWorkspace.spec!.template!.attributes = flattenedDevfile.attributes; + devfileContext.devWorkspace.spec!.template!.attributes = {}; + } + + for (const key of Object.keys(flattenedDevfile.attributes)) { + if (flattenedDevfile.attributes[key]) { + devfileContext.devWorkspace.spec!.template!.attributes[key] = flattenedDevfile.attributes[key]; + } } } catch (error) { await vscode.window.showErrorMessage(`Failed to update DevWorkspace attributes. ${error}`);