mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-04-13 00:00:10 +08:00
fix(ssr): fix window references
This commit is contained in:
@@ -85,7 +85,9 @@ export class ThemeableBrowserObject {
|
||||
styleOptions
|
||||
);
|
||||
} catch (e) {
|
||||
window.open(url);
|
||||
if (typeof window !== 'undefined') {
|
||||
window.open(url);
|
||||
}
|
||||
console.warn(
|
||||
'Native: ThemeableBrowser is not installed or you are running on a browser. Falling back to window.open.'
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user