mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-06-19 21:29:36 +08:00
Inspector crashes when a device name contained spaces
Reviewed By: Hypuk Differential Revision: D5434498 fbshipit-source-id: f758497ca50e4c02e436812725acfe0dcb8428b4
This commit is contained in:
committed by
Facebook Github Bot
parent
e5e9cab8ed
commit
9df79e7e96
@@ -30,9 +30,10 @@ static NSString *getDebugServerHost(NSURL *bundleURL)
|
||||
|
||||
static NSURL *getInspectorDeviceUrl(NSURL *bundleURL)
|
||||
{
|
||||
NSString *escapedText = [[[UIDevice currentDevice] name] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
||||
return [NSURL URLWithString:[NSString stringWithFormat:@"http://%@/inspector/device?name=%@",
|
||||
getDebugServerHost(bundleURL),
|
||||
[[UIDevice currentDevice] name]]];
|
||||
escapedText]];
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user