diff options
author | Trevor Elliott <trevor@galois.com> | 2013-06-14 14:05:47 -0700 |
---|---|---|
committer | Trevor Elliott <trevor@galois.com> | 2013-06-14 14:05:53 -0700 |
commit | e2771d771d7be1413a5528f34f2c89cdb7fddbc4 (patch) | |
tree | 97111d00d0c428f24ab835c008d2622b3cde264d /src/js | |
parent | 449b6cf00d62cfb785203f84c75d9161ce56b829 (diff) |
Better justification for manifest mangling
Diffstat (limited to 'src/js')
-rw-r--r-- | src/js/fiveui/js/rules.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/js/fiveui/js/rules.js b/src/js/fiveui/js/rules.js index d87d606..7e55b4f 100644 --- a/src/js/fiveui/js/rules.js +++ b/src/js/fiveui/js/rules.js @@ -120,16 +120,20 @@ fiveui.RuleSet.load = function(manifest_url, options) { return; } + // set defaults in the parsed manifest var manifest = fiveui.RuleSet.sanitize(obj); - // explicitly zero out the patterns, they shouldn't be part of the // manifest. manifest.patterns = []; - var rules = manifest.rules; - manifest.rules = []; + // remove the rules, as they'll be added back once processed. + var rules = manifest.rules; + manifest.rules = []; + + // overwrite any source present with the one given by the user. manifest.source = manifest_url; + loadRules(manifest, rules); }, |