Skip to content

Commit

Permalink
Refactor secondPass payload for values
Browse files Browse the repository at this point in the history
  • Loading branch information
L0stSoul authored and tonyganch committed Jun 9, 2014
1 parent cd507ca commit 258f986
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/options/vendor-prefix-align.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,19 +307,20 @@ module.exports = {
namespaceSelector: this._getDeclName,
getExtraSymbols: this._extraIndentVal,
payload: function(info, i) {
for (var a = 0; a < node[i][3].length; ++a) {
if (node[i][3][a][0] !== 'function' && node[i][3][a][0] !== 'ident')
var valueNode = node[i][3];
for (var a = 0; a < valueNode.length; ++a) {
if (valueNode[a][0] !== 'function' && valueNode[a][0] !== 'ident')
continue;

if (node[i][3][a - 1][0] !== 's') {
node[i][3].splice(a, 0, ['s', '']);
if (valueNode[a - 1][0] !== 's') {
valueNode.splice(a, 0, ['s', '']);
++a;
}

break;
}

node[i][3][a - 1][1] = _this._updateIndent(info, dict, node[i][3][a - 1][1]);
node[i][3][a - 1][1] = _this._updateIndent(info, dict, valueNode[a - 1][1]);
}
});

Expand Down

0 comments on commit 258f986

Please sign in to comment.