Skip to content

Commit

Permalink
fix preserve logic for titleLang
Browse files Browse the repository at this point in the history
- closes #2604
  • Loading branch information
foxriver76 committed Mar 27, 2024
1 parent 1f272f1 commit 1cd5c0b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/cli/src/lib/setup/setupUpload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ export class Upload {

for (const [attr, attrData] of Object.entries(additional)) {
// preserve these attributes, except, they were undefined before and preserve titleLang if current titleLang is of type string (changed by user)
if (preserveAttributes.includes(attr) || (attr === 'titleLang' && typeof attrData === 'string')) {
if (preserveAttributes.includes(attr) || (attr === 'titleLang' && typeof target[attr] === 'string')) {
if (target[attr] === undefined) {
target[attr] = attrData;
}
Expand Down Expand Up @@ -795,6 +795,7 @@ export class Upload {
* @param name
* @param ioPack
* @param _logger
* @param logger
*/
async upgradeAdapterObjects(
name: string,
Expand Down

0 comments on commit 1cd5c0b

Please sign in to comment.