Skip to content

Commit 6bb8da7

Browse files
committed
Save reference to the initial devtools object
We shouldn't recreate object each time because if we want to get current status -> we couldn't because every 500 ms it's another object.
1 parent bf17175 commit 6bb8da7

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

index.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,15 @@
3333
emitEvent(true, orientation);
3434
}
3535

36-
devtools = {
37-
open: true,
38-
orientation: orientation
39-
};
36+
devtools.open = true;
37+
devtools.orientation = orientation;
4038
} else {
4139
if (devtools.open) {
4240
emitEvent(false, null);
4341
}
4442

45-
devtools = {
46-
open: false,
47-
orientation: null
48-
};
43+
devtools.open = false;
44+
devtools.orientation = null;
4945
}
5046
}, 500);
5147

0 commit comments

Comments
 (0)