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