mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
#3036 Added Try Catch
This commit is contained in:
@@ -45,9 +45,10 @@ export class NativeContainerService {
|
||||
public sendMessage(message: any) {
|
||||
this.windowRef.nativeWindow.postMessage({ status: 'IN_PROGRESS', data: 'Scan Started' }, '*');
|
||||
|
||||
if (this.isUiWebview() && this.isUiWebview().isNative) {
|
||||
try {
|
||||
// if (this.isUiWebview() && this.isUiWebview().isNative) {
|
||||
(this.windowRef.nativeWindow as any).webkit.messageHandlers.scanRequest.postMessage(message);
|
||||
} else {
|
||||
} catch (error) {
|
||||
this.windowRef.nativeWindow.postMessage({ status: 'ERROR', data: 'Not a WebView' }, '*');
|
||||
this.windowRef.nativeWindow.postMessage(message, '*');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user