adventure-time
adventure-time copied to clipboard
file tree fails to populate intermittently
Approximately 3/4 times I load http://rik.smith-unna.com/command_line_bootcamp, the file tree fails to populate (see blahah/command_line_bootcamp#10).
expose-fs is working fine - when the error happens I can retrieve the JSON response manually.
My best guess is that the tree is trying to populate itself before the data source is ready - currently it waits for $(window).ready(). Is there a simple way to load it only after the container is ready? Like maybe connect a socket and only populate the tree after receiving a stdout response, as with the terminal?
Apologies if I've missed something obvious.
Perhaps a more robust approach would be to retry the xhrs a set number of times, with a sensible delay, if they fail.
The linked commit above completely fixes the issue. Shout if you want a PR back to this repo.
Yeah a pr back would be great, thank you!