mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 23:24:06 +08:00
Use +[RCTConvert NSURL:] everywhere instead of +[NSURL URLWithString:]
Summary: RCTConvert's URL: method gracefully handles unescaped urls, local file urls, urls containing unicode, etc. URLWithString doesn't.
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
|
||||
#import "RCTWebSocketExecutor.h"
|
||||
|
||||
#import "RCTConvert.h"
|
||||
#import "RCTLog.h"
|
||||
#import "RCTSparseArray.h"
|
||||
#import "RCTUtils.h"
|
||||
@@ -38,7 +39,7 @@ RCT_EXPORT_MODULE()
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
return [self initWithURL:[NSURL URLWithString:@"http://localhost:8081/debugger-proxy"]];
|
||||
return [self initWithURL:[RCTConvert NSURL:@"http://localhost:8081/debugger-proxy"]];
|
||||
}
|
||||
|
||||
- (instancetype)initWithURL:(NSURL *)URL
|
||||
|
||||
Reference in New Issue
Block a user