1 | /* global window */
|
2 | var Promise = require('unexpected-bluebird');
|
3 | var useFullStackTrace = false;
|
4 | if (typeof window !== 'undefined' && typeof window.location !== 'undefined') {
|
5 | useFullStackTrace = !!window.location.search.match(
|
6 | /[?&]full-trace=true(?:$|&)/
|
7 | );
|
8 | }
|
9 |
|
10 | if (
|
11 | typeof process !== 'undefined' &&
|
12 | process.env &&
|
13 | process.env.UNEXPECTED_FULL_TRACE
|
14 | ) {
|
15 | Promise.longStackTraces();
|
16 | useFullStackTrace = true;
|
17 | }
|
18 | module.exports = useFullStackTrace;
|