Skip to content

Commit

Permalink
Guard against error
Browse files Browse the repository at this point in the history
Error, repro not yet clear

```
TypeError: Cannot read property '0' of undefined
    at /home/ubuntu/public-website/node_modules/clarify/clarify.js:10:35
    at Array.0 (/home/ubuntu/public-website/node_modules/clarify/clarify.js:9:17)
    at TraceModifier._modify (/home/ubuntu/public-website/node_modules/clarify/node_modules/stack-chain/stack-chain.js:41:32)
    at Function.Error.prepareStackTrace (/home/ubuntu/public-website/node_modules/clarify/node_modules/stack-chain/stack-chain.js:81:25)
```
  • Loading branch information
cdnbacon committed Feb 5, 2014
1 parent b680a42 commit 16d2db7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clarify.js
Expand Up @@ -7,6 +7,7 @@ var chain = require('stack-chain');

chain.filter.attach(function (error, frames) {
return frames.filter(function (callSite) {
return (callSite.getFileName()[0] === '/');
var name = callSite && callSite.getFileName();
return (name && name[0] === '/');
});
});

0 comments on commit 16d2db7

Please sign in to comment.