Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ariflo committed Jan 5, 2023
1 parent ff1fac6 commit a5bcd4e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export class ReactNativeWebViewController extends ViewController {
const data: any = JSON.parse(event.nativeEvent.data, (key, value) => {
try {
if (value && typeof value === 'object' && value.flag && value.flag === 'MAGIC_PAYLOAD_FLAG_TYPED_ARRAY') {
return global[value.constructor as keyof Global](value.data.split(','));
return new (global[value.constructor as keyof Global] as any)(value.data.split(','));
}

// silently handles exception and return the original copy
Expand Down

0 comments on commit a5bcd4e

Please sign in to comment.