mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Prettier React Native Libraries
Reviewed By: sahrens Differential Revision: D7961488 fbshipit-source-id: 05f9b8b0b91ae77f9040a5321ccc18f7c3c1ce9a
This commit is contained in:
committed by
Facebook Github Bot
parent
1e2de71290
commit
d01ab66b47
@@ -4,8 +4,10 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
* @flow
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
export type StackFrame = {
|
||||
@@ -28,7 +30,9 @@ function parseErrorStack(e: ExtendedError): Array<StackFrame> {
|
||||
* error found when Flow v0.54 was deployed. To see the error delete this
|
||||
* comment and run Flow. */
|
||||
const stacktraceParser = require('stacktrace-parser');
|
||||
const stack = Array.isArray(e.stack) ? e.stack : stacktraceParser.parse(e.stack);
|
||||
const stack = Array.isArray(e.stack)
|
||||
? e.stack
|
||||
: stacktraceParser.parse(e.stack);
|
||||
|
||||
let framesToPop = typeof e.framesToPop === 'number' ? e.framesToPop : 0;
|
||||
while (framesToPop--) {
|
||||
|
||||
Reference in New Issue
Block a user