fix: worker not being called to work on sorting

This commit is contained in:
Bao Nguyen
2023-02-18 10:42:15 +07:00
parent c439aeeaf0
commit 31f63bcc87
2 changed files with 3 additions and 1 deletions

View File

@@ -51,7 +51,7 @@ onmessage = async ({data}) => {
return elm[option_key];
}
}
let sorted_items = sort(items).by([predicate]);
postMessage({id, sorted_items, type: 'sorted'})

View File

@@ -53,6 +53,8 @@
last_sort_tx_hash = hash;
worker.postMessage({type: 'sort', hash, ...hash_object});
}
} else {
last_sort_tx_hash = null;
}
}