The `doRenderSearchString` function is asynchronous.  I used `return doRenderSearchString()` to avoid the braces on the if statement on line 347.  (This is a habit I picked up from some node.js code.  Sorry!)  Since I am adding braces, I will remove the confusing return.