From 727e2678537c05b6ce72bf1a3f43ff3f517a92eb Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Thu, 25 May 2017 12:47:36 +0100
Subject: [PATCH] we don't really need a webContents like that, so pass if
 needed

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---
 electron_app/src/webcontents-handler.js | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/electron_app/src/webcontents-handler.js b/electron_app/src/webcontents-handler.js
index 35785e8b..37416ebe 100644
--- a/electron_app/src/webcontents-handler.js
+++ b/electron_app/src/webcontents-handler.js
@@ -1,8 +1,6 @@
 const {clipboard, nativeImage, Menu, MenuItem, shell} = require('electron');
 const url = require('url');
 
-let webContents;
-
 const PERMITTED_URL_SCHEMES = [
     'http:',
     'https:',
@@ -108,9 +106,7 @@ function onEditableContextMenu(ev, params) {
 }
 
 
-module.exports = (_webContents) => {
-    webContents = _webContents;
-
+module.exports = (webContents) => {
     webContents.on('new-window', onWindowOrNavigate);
     webContents.on('will-navigate', onWindowOrNavigate);