We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8ce90c commit dee3ab0Copy full SHA for dee3ab0
lib/extendStringPrototype.js
@@ -73,18 +73,16 @@ module['exports'] = function() {
73
} else {
74
if (typeof(theme[prop]) === 'string') {
75
colors[prop] = colors[theme[prop]];
76
- addProperty(prop, function() {
77
- return colors[theme[prop]](this);
78
- });
79
80
81
- var ret = this;
82
- for (var t = 0; t < theme[prop].length; t++) {
83
- ret = colors[theme[prop][t]](ret);
84
- }
85
- return ret;
86
+ var tmp = colors[theme[prop][0]];
+ for (var t = 1; t < theme[prop].length; t++) {
+ tmp = tmp[theme[prop][t]];
+ }
+ colors[prop] = tmp;
87
}
+ addProperty(prop, function() {
+ return colors[prop](this);
+ });
88
89
});
90
0 commit comments