Skip to content

Commit

Permalink
fix: string assignment using nullish coalescing operator (#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
marianfoo authored Jan 3, 2024
1 parent e5007b0 commit 530fcbd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/ui5-cc-spreadsheetimporter/src/controller/Parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ export default class Parser extends ManagedObject {
this.addMessageToMessages("errorWhileParsing", util, messageHandler, index, [metadataColumn.label], rawValue);
}
} else {
payload[columnKey] = `${rawValue || ""}`;
// assign "" only if rawValue is undefined or null
payload[columnKey] = `${rawValue ?? ""}`;
}
}
}
Expand Down

0 comments on commit 530fcbd

Please sign in to comment.