mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-05 12:56:42 +02:00
Fix exception in app
This commit is contained in:
@@ -120,11 +120,15 @@ export class BxEventBus<TEvents extends Record<string, any>> {
|
||||
|
||||
// Call method inside Android app
|
||||
if (AppInterface) {
|
||||
if (event in this.appJsInterfaces) {
|
||||
const method = this.appJsInterfaces[event];
|
||||
AppInterface[method] && AppInterface[method]();
|
||||
} else {
|
||||
AppInterface.onEventBus(this.group + '.' + (event as string));
|
||||
try {
|
||||
if (event in this.appJsInterfaces) {
|
||||
const method = this.appJsInterfaces[event];
|
||||
AppInterface[method] && AppInterface[method]();
|
||||
} else {
|
||||
AppInterface.onEventBus(this.group + '.' + (event as string));
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user