Skip to content

Commit

Permalink
Fix error when renaming field with undefined value
Browse files Browse the repository at this point in the history
  • Loading branch information
cdauth committed Nov 25, 2024
1 parent 2da3759 commit 7b3dc10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/database/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ export default class DatabaseHelpers {
const newNames: string[] = [ ];

for(const oldName in rename) {
if(rename[oldName].name) {
if(rename[oldName].name && object.data[oldName] != null) {
newData[rename[oldName].name!] = object.data[oldName];
newNames.push(rename[oldName].name!);
if(!newNames.includes(oldName))
Expand Down

0 comments on commit 7b3dc10

Please sign in to comment.