@youtyan/code-viewer 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/code-viewer.js +5 -1
- package/package.json +1 -1
package/dist/code-viewer.js
CHANGED
|
@@ -5115,6 +5115,10 @@ function createTableMetaCache(now = () => Date.now()) {
|
|
|
5115
5115
|
}
|
|
5116
5116
|
};
|
|
5117
5117
|
}
|
|
5118
|
+
function observeBackgroundRejection(promise) {
|
|
5119
|
+
promise.catch(() => {});
|
|
5120
|
+
return promise;
|
|
5121
|
+
}
|
|
5118
5122
|
function createDockerAdapter(config) {
|
|
5119
5123
|
async function execAsync(sql, signal) {
|
|
5120
5124
|
const result = await execInContainerAsync(config, sql, 1e4, signal);
|
|
@@ -5386,7 +5390,7 @@ function createDockerAdapter(config) {
|
|
|
5386
5390
|
const id = tableIdentifier(table);
|
|
5387
5391
|
const countSql = `SELECT COUNT(*) AS cnt FROM ${id}`;
|
|
5388
5392
|
const columnsPromise = tableMetaCache.getColumns(table, () => fetchColumnsAsyncUncached(table, signal));
|
|
5389
|
-
const totalRowsPromise = tableMetaCache.getRowCount(table, async () => rowCountFromResult(await execAsync(countSql, signal)));
|
|
5393
|
+
const totalRowsPromise = observeBackgroundRejection(tableMetaCache.getRowCount(table, async () => rowCountFromResult(await execAsync(countSql, signal))));
|
|
5390
5394
|
let columns;
|
|
5391
5395
|
try {
|
|
5392
5396
|
columns = await columnsPromise;
|