diff --git a/package.json b/package.json index 295c965..a0ac7d0 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "repository": { "url": "https://github.com/cmoog/vscode-sql-notebook" }, - "version": "0.5.0", + "version": "0.5.1", "preview": false, "engines": { "vscode": "^1.59.0" diff --git a/src/driver.ts b/src/driver.ts index b2df8a3..4fe7012 100644 --- a/src/driver.ts +++ b/src/driver.ts @@ -112,8 +112,9 @@ function mysqlConn(conn: mysql.PoolConnection, queryTimeout: number): Conn { return [[result]]; } - // this reliably indicates whether there are results for multiple distinct queries - const hasMultipleResults = ok.length > 1; + // this indicates whether there are results for multiple distinct queries + const hasMultipleResults = + ok.length > 1 && ok.some((a: any) => a?.length); if (hasMultipleResults) { // when we have `ResultSetHeader`, which is the result of an exec request, // we want to nest that into an array so that is display as a single row table