Skip to content

Commit

Permalink
Merge pull request #431 from mnphnic/fix-scope
Browse files Browse the repository at this point in the history
Fix: this(chrome-window) to modules.
  • Loading branch information
gkatsev committed Feb 29, 2016
2 parents e8d2d6d + bde7fc1 commit 0b1e79d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion common/content/buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1814,6 +1814,9 @@ const Buffer = Module("buffer", {
});

/* Expose Buffer constructor */
Object.defineProperty(this, "Buffer", { value: Buffer });
Object.defineProperty(modules, "Buffer", {
value: Buffer,
enumerable: true
});

// vim: set fdm=marker sw=4 ts=4 et:
5 changes: 4 additions & 1 deletion common/content/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,10 @@ const Commands = Module("commands", {

(function () {
/* Expose Command constructor for user-defined sub-commands. */
Object.defineProperty(this, "Command", { value: Command });
Object.defineProperty(modules, "Command", {
value: Command,
enumerable: true
});

Commands.quoteMap = {
"\n": "n",
Expand Down

0 comments on commit 0b1e79d

Please sign in to comment.