mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-05-02 00:07:23 +08:00
fix(ssr): remove cordova warning during ssr
This commit is contained in:
@@ -354,20 +354,22 @@ export function pluginWarn(pluginName: string, plugin?: string, method?: string)
|
|||||||
* @param method
|
* @param method
|
||||||
*/
|
*/
|
||||||
export function cordovaWarn(pluginName: string, method?: string): void {
|
export function cordovaWarn(pluginName: string, method?: string): void {
|
||||||
if (method) {
|
if (typeof process === 'undefined') {
|
||||||
console.warn(
|
if (method) {
|
||||||
'Native: tried calling ' +
|
console.warn(
|
||||||
pluginName +
|
'Native: tried calling ' +
|
||||||
'.' +
|
pluginName +
|
||||||
method +
|
'.' +
|
||||||
', but Cordova is not available. Make sure to include cordova.js or run in a device/simulator'
|
method +
|
||||||
);
|
', but Cordova is not available. Make sure to include cordova.js or run in a device/simulator'
|
||||||
} else {
|
);
|
||||||
console.warn(
|
} else {
|
||||||
'Native: tried accessing the ' +
|
console.warn(
|
||||||
pluginName +
|
'Native: tried accessing the ' +
|
||||||
' plugin but Cordova is not available. Make sure to include cordova.js or run in a device/simulator'
|
pluginName +
|
||||||
);
|
' plugin but Cordova is not available. Make sure to include cordova.js or run in a device/simulator'
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user