mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
use startActivity if foreground activity is still not defined
This commit is contained in:
@@ -191,7 +191,7 @@ export function addCss(cssText: string, attributeScoped?: boolean): void {
|
||||
const CALLBACKS = '_callbacks';
|
||||
|
||||
export function _resetRootView(entry?: NavigationEntry | string): void {
|
||||
const activity = androidApp.foregroundActivity;
|
||||
const activity = androidApp.foregroundActivity || androidApp.startActivity;
|
||||
if (!activity) {
|
||||
throw new Error('Cannot find android activity.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user