A Common-Sense Guide to Data Structures and Algorithms, Second Edition: (pg460)

Hello! Thanks for the great book.
I was attempting the Trie (chap 17) exercises and for number 4 the solution provided for the autocorrect function does not work as intended. I made sure to double check my code, even copied and pasted and the function would just return the first item in the list of words regardless of the current node that was sent to it. I hope you get a chance to look at it.
Update: It works if the collectAllWords function, explained earlier in chapter 17, is updated to start from the currentNode being passed from the autocorrect function. How this collect function was set up it would always start from the root of the Trie even if the correct node was passed.

#errata
/book-a-common-sense-guide-to-data-structures-and-algorithms-second-edition by @jaywengrow