summaryrefslogtreecommitdiff
path: root/source/libs/utils.ts
diff options
context:
space:
mode:
authorGravatar Federico Brigante <opensource@bfred.it> 2020-03-13 22:32:28 +0100
committerGravatar Federico Brigante <opensource@bfred.it> 2020-03-16 17:38:21 +0100
commitd167c57397c66a4878024df52a2b58ec30c50a0a (patch)
treef9cdc4fe9efc034bdb6b1de21b4c898fee4719ff /source/libs/utils.ts
parentb27da46fed7026428e67e074097d39acfcb46e3f (diff)
downloadrefined-github-d167c57397c66a4878024df52a2b58ec30c50a0a.tar.gz
refined-github-d167c57397c66a4878024df52a2b58ec30c50a0a.tar.zst
refined-github-d167c57397c66a4878024df52a2b58ec30c50a0a.zip
Meta: Fix util function
Diffstat (limited to 'source/libs/utils.ts')
-rw-r--r--source/libs/utils.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/libs/utils.ts b/source/libs/utils.ts
index c77bbc7c..dd2545a2 100644
--- a/source/libs/utils.ts
+++ b/source/libs/utils.ts
@@ -122,7 +122,7 @@ export const flatZip = <T>(table: T[][], limit = Infinity): T[] => {
const zipped = [];
for (let col = 0; col < maxColumns; col++) {
for (const row of table) {
- if (row[col]) {
+ if (row.length > col) {
zipped.push(row[col]);
if (zipped.length === limit) {
return zipped;