Closed dominictarr closed 12 years ago
Added failing test, then fixed it.
Instead of inspecting the children of the node, inspect it's parents...
The traversal stops on each string, so check if that string is the child of a call to require.
Can't say this is the best solution, but this fixes the deep chaining bug #11, with a short edit distance from the original code.
This pull request is excellent: the failing test comes first and the fix mostly involves deleting lines.
Added failing test, then fixed it.
Instead of inspecting the children of the node, inspect it's parents...
The traversal stops on each string, so check if that string is the child of a call to require.
Can't say this is the best solution, but this fixes the deep chaining bug #11, with a short edit distance from the original code.