fix(ssr): fix window references

This commit is contained in:
Adam Bradley
2019-02-23 17:05:19 -06:00
parent 5b1bdc37e0
commit c2029f7927
2 changed files with 13 additions and 3 deletions
@@ -26,7 +26,10 @@ export class IonicNativePlugin {
* Returns the original plugin object
*/
static getPlugin(): any {
return get(window, this.pluginRef);
if (typeof window !== 'undefined') {
return get(window, this.pluginRef);
}
return null;
}
/**