mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-01 22:21:51 +00:00
fix: Return correct scalar value
This commit is contained in:
1 parent
4d07862601
commit
21ded71fde
1 file changed
+1
-1
@@ -21,7 +21,7 @@ export const parseResponse = (type: QueryType, result: QueryResponse): QueryResp
|
||||
return isRowDataPacket(result) ? result[0] : null;
|
||||
|
||||
case 'scalar':
|
||||
return isRowDataPacketArray(result) ? result[0][0] : null;
|
||||
return isRowDataPacketArray(result) ? Object.values(result[0])[0] : null;
|
||||
|
||||
default:
|
||||
return result || null;
|
||||
|
||||
Reference in new issue
Block a user