Fix JS error when the console is not available

In case binding_of_caller is not present the console is not rendered.
Stack trace navigation will fail because of that. This commit fixes the
issue.