Browse Source

Add comments to type helper

pull/221/head
Julian Simioni 9 years ago
parent
commit
d45b09b0b3
  1. 8
      helper/types.js

8
helper/types.js

@ -14,7 +14,9 @@ module.exports = function calculate_types(clean_types) {
return undefined; return undefined;
} }
/* the layers and source parameters are cumulative:
* perform a set insersection of their specified types
*/
if (clean_types.from_layers || clean_types.from_source) { if (clean_types.from_layers || clean_types.from_source) {
var types = valid_types; var types = valid_types;
@ -29,6 +31,10 @@ module.exports = function calculate_types(clean_types) {
return types; return types;
} }
/*
* Type restrictions requested by the address parser should only be used
* if both the source and layers parameters are empty, so do this last
*/
if (clean_types.from_address_parser) { if (clean_types.from_address_parser) {
return clean_types.from_address_parser; return clean_types.from_address_parser;
} }

Loading…
Cancel
Save