File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
packages/javascript-sdk/src/api Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @rushdb/javascript-sdk ' : patch
3
+ ' rushdb-docs ' : patch
4
+ ' rushdb-core ' : patch
5
+ ' rushdb-dashboard ' : patch
6
+ ' rushdb-website ' : patch
7
+ ---
8
+
9
+ Fix processing boolean response at createMany method
Original file line number Diff line number Diff line change @@ -291,9 +291,11 @@ export class RestAPI {
291
291
// If `returnResult` was not explicitly set to `true`, `response.data` may be just `true`.
292
292
// In that case, fallback to an empty array. Otherwise, map records to typed instances.
293
293
const dbRecordInstances =
294
- ( response . data as Array < DBRecord < S > > ) ?. map ( ( r ) => {
295
- return new DBRecordInstance < S > ( r )
296
- } ) ?? [ ]
294
+ isArray ( response . data ) ?
295
+ ( < Array < DBRecord < S > > > response . data ) ?. map ( ( r ) => {
296
+ return new DBRecordInstance < S > ( r )
297
+ } )
298
+ : [ ]
297
299
return new DBRecordsArrayInstance < S > ( dbRecordInstances , response . total )
298
300
}
299
301
You can’t perform that action at this time.
0 commit comments