diff --git a/index.ts b/index.ts index 6c0ff30..149bad1 100644 --- a/index.ts +++ b/index.ts @@ -4,7 +4,7 @@ import { isVersionGreaterOrEqual } from './src/common/utils'; const electronVersion = process.versions.electron; // Check if WebContentsView exists and if the version is >= 29.0.0 -let WebContentsView_: any; // Use 'any' for dynamic checking +let WebContentsView_: any = undefined; // Use 'any' for dynamic checking if (isVersionGreaterOrEqual('29.0.0', electronVersion) && 'WebContentsView' in Electron) { WebContentsView_ = Electron.WebContentsView; // Assign if it exists