fix: closes #11343, don't crash if tags array is empty

This commit is contained in:
Barış Soner Uşaklı
2023-03-10 11:40:02 -05:00
parent c03d5db71e
commit 56427e4f9d
4 changed files with 10 additions and 2 deletions

View File

@@ -32,6 +32,9 @@ SELECT COUNT(DISTINCT z."value") c
async function getSortedSetUnion(params) {
const { sets } = params;
if (!sets || !sets.length) {
return [];
}
const start = params.hasOwnProperty('start') ? params.start : 0;
const stop = params.hasOwnProperty('stop') ? params.stop : -1;
let weights = params.weights || [];