From 048943447931d3126cf4b7fff24ca39789cafa2c Mon Sep 17 00:00:00 2001 From: hparfr Date: Mon, 11 Sep 2017 11:49:24 +0000 Subject: [PATCH] Lint part 2 --- web_switch_company_warning/__manifest__.py | 2 +- .../static/src/js/switch_company_warning_worker.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web_switch_company_warning/__manifest__.py b/web_switch_company_warning/__manifest__.py index b8674d64..d7f6e43f 100644 --- a/web_switch_company_warning/__manifest__.py +++ b/web_switch_company_warning/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Multicompany - Switch Company Warning", "summary": "Show a warning if current company has been switched" - " in another tab or window.", + " in another tab or window.", "version": "10.0.0.1.0", "category": "web", "website": "http://akretion.com", diff --git a/web_switch_company_warning/static/src/js/switch_company_warning_worker.js b/web_switch_company_warning/static/src/js/switch_company_warning_worker.js index 014fcfb3..f5f23add 100644 --- a/web_switch_company_warning/static/src/js/switch_company_warning_worker.js +++ b/web_switch_company_warning/static/src/js/switch_company_warning_worker.js @@ -9,11 +9,11 @@ addEventListener("connect", function(ee) { var port = ee.ports[0]; con.push(port); - port.onmessage = function (e) { //addEventListener doesnt seams to work well + port.onmessage = function (e) { var newCtx = e.data; if (lastCtx && newCtx !== lastCtx) { - con.map(function (eport) { + con.forEach(function (eport) { eport.postMessage({type: "newCtx", "newCtx": newCtx, "lastCtx": lastCtx}); }); }