Browse Source

Lint part 2

pull/722/head
hparfr 7 years ago
parent
commit
0489434479
  1. 4
      web_switch_company_warning/static/src/js/switch_company_warning_worker.js

4
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});
});
}

Loading…
Cancel
Save