fix(ssr): remove cordova warning during ssr

This commit is contained in:
Adam Bradley
2019-02-24 00:16:45 -06:00
parent c2029f7927
commit 7e090cc6f2
+16 -14
View File
@@ -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'
);
}
} }
} }