Skip to content

Commit

Permalink
Removed usage of _.pick.
Browse files Browse the repository at this point in the history
  • Loading branch information
ifandelse committed Dec 5, 2016
1 parent 4a1665a commit a948c18
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/postal.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ ChannelDefinition.prototype.publish = function() {
if ( typeof envelope !== "object" ) {
throw new Error( "The first argument to ChannelDefinition.publish should be either an envelope object or a string topic." );
}
envelope.headers = _.extend( envelope.headers || {}, _.pick( _config, [ "resolverNoCache" ] ) );
envelope.headers = _.extend( envelope.headers || { resolverNoCache: _config.resolverNoCache } );
envelope.channel = this.channel;
this.bus.publish( envelope, callback );
};
Expand Down
3 changes: 1 addition & 2 deletions lib/postal.lodash.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
isEqual: require( "lodash/isEqual" ),
keys: require( "lodash/keys" ),
map: require( "lodash/map" ),
pick: require( "lodash/pick" ),
throttle: require( "lodash/throttle" )
};

Expand Down Expand Up @@ -85,7 +84,7 @@ ChannelDefinition.prototype.publish = function() {
if ( typeof envelope !== "object" ) {
throw new Error( "The first argument to ChannelDefinition.publish should be either an envelope object or a string topic." );
}
envelope.headers = _.extend( envelope.headers || {}, _.pick( _config, [ "resolverNoCache" ] ) );
envelope.headers = _.extend( envelope.headers || { resolverNoCache: _config.resolverNoCache } );
envelope.channel = this.channel;
this.bus.publish( envelope, callback );
};
Expand Down
2 changes: 1 addition & 1 deletion lib/postal.lodash.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a948c18

Please sign in to comment.