Permalink
Browse files

Redefined RJSS classes / IDs must override values

If a previous selector such as:
.a { color: 'red' } 
has been defined
And later another selector such as:
.a { colour: 'green' }
is defined then the latter must take precedence
  • Loading branch information...
1 parent c957354 commit a69d9a809afa740abbd181b9333f9107dbfee1b6 @mattheworiordan committed Jul 27, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 redux.js
View
@@ -350,10 +350,10 @@ var redux = function (selector) {
}
for (var index in overrider) {
if (overrider.hasOwnProperty(index)) {
- if (typeof original[index] == 'undefined') {
- original[index] = overrider[index];
- } else if (typeof overrider[index] == 'object') {
+ if (typeof overrider[index] == 'object') {
original[index] = mergeObjects(original[index], overrider[index]);
+ } else {
+ original[index] = overrider[index];
}
}
}

0 comments on commit a69d9a8

Please sign in to comment.