Skip to content

Commit

Permalink
Fix check ?? "" before trim on transform function
Browse files Browse the repository at this point in the history
  • Loading branch information
chanwit-y committed Nov 6, 2024
1 parent 6adabae commit c1198bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/utils/common/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const transform = (content: string) => {
// console.log("p", p);
// console.log("c", c.split(":"));
const [k, v] = c.split(":");
return { ...p, [key(k)]: v.trim() };
return { ...p, [key(k)]: (v ?? "").trim() };
},
{
thai: "",
Expand Down

0 comments on commit c1198bd

Please sign in to comment.