Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7b38d37

Browse files
Remove outdated __proto__ workaround.
Signed-off-by: Eric Wang <skygragon@gmail.com>
1 parent 5cf7af7 commit 7b38d37

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

‎lib/chalk.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ chalk.wrap = function(pre, post) {
4141
var f = function(s) {
4242
return chalk.print(s);
4343
};
44-
f.__proto__=chalk;
44+
Object.setPrototypeOf(f,chalk);
4545
return f;
4646
};
4747

‎lib/plugin.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ Plugin.prototype.init = function() {
2121
};
2222

2323
Plugin.prototype.setNext = function(next) {
24-
this.next = this.__proto__ = next;
24+
Object.setPrototypeOf(this, next);
25+
this.next = next;
2526
};
2627

2728
Plugin.plugins = [];

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /