mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-27 22:54:46 +08:00
[RN] Show only file name in RedBox
This commit is contained in:
@@ -206,10 +206,10 @@ RCT_NOT_IMPLEMENTED(-initWithCoder:(NSCoder *)aDecoder)
|
||||
|
||||
cell.textLabel.text = stackFrame[@"methodName"];
|
||||
|
||||
NSString *fileAndLine = stackFrame[@"file"];
|
||||
NSString *fileAndLine = [stackFrame[@"file"] lastPathComponent];
|
||||
if (fileAndLine) {
|
||||
fileAndLine = [fileAndLine stringByAppendingFormat:@":%@", stackFrame[@"lineNumber"]];
|
||||
cell.detailTextLabel.text = cell.detailTextLabel.text = fileAndLine;
|
||||
cell.detailTextLabel.text = fileAndLine;
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user