}; } render() { const { stacktrace, onViewSourceInDebugger, sourceMapURLService } = this.props; if (!stacktrace || !stacktrace.length) { return null; } const frames = []; stacktrace.forEach((s, i) => { if (s.asyncCause) { frames.push( "\t", AsyncFrame({ key: `${i}-asyncframe`, asyncCause: s.asyncCause, }), "\n" ); } frames.push( "\t", Frame({ key: `${i}-frame`, frame: { functionDisplayName: s.functionName, source: s.filename, line: s.lineNumber, column: s.columnNumber, }, showFunctionName: true, showAnonymousFunctionName: true, showFullSourceUrl: true, onClick: onViewSourceInDebugger, sourceMapURLService, }), "\n" ); }); return dom.div({ className: "stack-trace" }, frames); } } const AsyncFrame = createFactory(AsyncFrameClass); module.exports = StackTrace; PK