Skip to content

Commit

Permalink
feat(Serializer): mask now is passed to decoder/encoder as the second…
Browse files Browse the repository at this point in the history
… argument
  • Loading branch information
iobaixas committed Oct 23, 2015
1 parent 764b562 commit 9db02ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/module/serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ RMModule.factory('RMSerializer', ['$injector', 'inflector', '$filter', 'RMUtils'
var filter = decoders[_name], result = _value;

if(filter) {
result = filter.call(_ctx, _value);
result = filter.call(_ctx, _value, _mask);
} else if(typeof _value === 'object') {
// IDEA: make extended decoding/encoding optional, could be a little taxing for some apps
if(isArray(_value)) {
Expand Down Expand Up @@ -157,7 +157,7 @@ RMModule.factory('RMSerializer', ['$injector', 'inflector', '$filter', 'RMUtils'
var filter = encoders[_name], result = _value;

if(filter) {
result = filter.call(_ctx, _value);
result = filter.call(_ctx, _value, _mask);
} else if(_value !== null && typeof _value === 'object' && typeof _value.toJSON !== 'function') {
// IDEA: make deep decoding/encoding optional, could be a little taxing for some apps
if(isArray(_value)) {
Expand Down

0 comments on commit 9db02ba

Please sign in to comment.