mirror of https://github.com/OCA/web.git
Lint part 2
parent
7303c02cac
commit
0489434479
|
@ -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",
|
||||
|
|
|
@ -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…
Reference in New Issue