right

I don't like this algorithm much:
* first we iterate over the draftLinks array
* then for each threadless draft we call indexOf (which has linear complexity)

I think the draftLinks map should be reversed: the key should be the id, the value the node. There is only one place where you need to get the id from the node and it happens from one node only; on the contrary, here, you're doing it for all threads. So I think the key should really be the id instead.

The alternative could be to build a more specialized object where the ids could be stored as an object key allowing a quick "has" operation.