fix: injected console cannot effect on iOS
This commit is contained in:
		| @@ -295,7 +295,9 @@ export function jsObtainEntry(contextId: string) { | ||||
| } | ||||
|  | ||||
| const global = Function('return this')() | ||||
| if (!Reflect.has(global, "console")) { | ||||
| if (Environment.platform === 'Android' | ||||
|     || Environment.platform === 'iOS' | ||||
|     || Environment.platform === 'Qt') { | ||||
|     Reflect.set(global, "console", { | ||||
|         warn: logw, | ||||
|         error: loge, | ||||
|   | ||||
| @@ -334,7 +334,9 @@ export function jsObtainEntry(contextId: string) { | ||||
| } | ||||
|  | ||||
| const global = Function('return this')() | ||||
| if (!Reflect.has(global, "console")) { | ||||
| if (Environment.platform === 'Android' | ||||
|     || Environment.platform === 'iOS' | ||||
|     || Environment.platform === 'Qt') { | ||||
|     Reflect.set(global, "console", { | ||||
|         warn: logw, | ||||
|         error: loge, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user