Skip to content

Commit 0b1e79d

Browse files
committed
Merge pull request #431 from mnphnic/fix-scope
Fix: this(chrome-window) to modules.
2 parents e8d2d6d + bde7fc1 commit 0b1e79d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

common/content/buffer.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1814,6 +1814,9 @@ const Buffer = Module("buffer", {
18141814
});
18151815

18161816
/* Expose Buffer constructor */
1817-
Object.defineProperty(this, "Buffer", { value: Buffer });
1817+
Object.defineProperty(modules, "Buffer", {
1818+
value: Buffer,
1819+
enumerable: true
1820+
});
18181821

18191822
// vim: set fdm=marker sw=4 ts=4 et:

common/content/commands.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,10 @@ const Commands = Module("commands", {
11881188

11891189
(function () {
11901190
/* Expose Command constructor for user-defined sub-commands. */
1191-
Object.defineProperty(this, "Command", { value: Command });
1191+
Object.defineProperty(modules, "Command", {
1192+
value: Command,
1193+
enumerable: true
1194+
});
11921195

11931196
Commands.quoteMap = {
11941197
"\n": "n",

0 commit comments

Comments
 (0)