Tree: Depth-First Search - Binary Tree Inorder Traversal
In the recursive inorder traversal code below, which line contains a subtle bug that can cause a runtime error on certain inputs?
```python
def inorder(node):
result = []
if node.left:
result.extend(inorder(node.left))
result.append(node.val)
if node.right:
result.extend(inorder(node.right))
return result
```
