Skip to content
Snippets Groups Projects
Commit a84302ae authored by Pregmodder's avatar Pregmodder
Browse files

Merge branch 'pregmod-dev' into 'pregmod-master'

Even more tweaking for rules second level properties

See merge request pregmodfan/fc-pregmod!847
parents eb977055 e613b40e
No related branches found
No related tags found
No related merge requests found
...@@ -928,6 +928,11 @@ window.mergeRules = function(rules) { ...@@ -928,6 +928,11 @@ window.mergeRules = function(rules) {
if (applies) if (applies)
{ {
//Objects in JS in operaions "=" pass by reference, so we need completly new object to avoid mess up previous rules.
if ("object" == typeof rules[i][prop] && "object" != typeof combinedRule[prop])
combinedRule[prop] = new Object();
//If we already have object - now we will process it's properties, but object itself should be skiped.
if ("object" != typeof combinedRule[prop]) if ("object" != typeof combinedRule[prop])
combinedRule[prop] = rules[i][prop]; combinedRule[prop] = rules[i][prop];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment