Skip to content

Commit

Permalink
Update query_builder.ts
Browse files Browse the repository at this point in the history
Correct the 'multiItem' is not defined error
  • Loading branch information
pinghe authored May 16, 2024
1 parent 58c4260 commit e20d952
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions agdb_api/typescript/src/query_builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,9 @@ class InsertBuilder {
Multi: [],
};

let multiItem: Components.Schemas.DbKeyValue[] = []
for (const elem of elems) {
multiItem = []
for (const key of Object.keys(elem)) {
if (key === "db_id") {
let id = elem[key];
Expand All @@ -386,6 +388,7 @@ class InsertBuilder {
};
}
}
data.values.Multi.push(multiItem)
}

return new InsertValuesIdsBuilder(data);
Expand Down

0 comments on commit e20d952

Please sign in to comment.