Skip to content

Commit

Permalink
Move from _.detect to _.find
Browse files Browse the repository at this point in the history
  • Loading branch information
Igrom committed Dec 11, 2019
1 parent 0c5d88e commit ca60889
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tasks/services/route53.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ module.exports = function(grunt) {
var recordsToCreate = _.select(records, function(record) {
//check for any Route53 record matching this record's name (with period on the end)
var checkForName = (record.name || record.Name) + '.';
return !_.detect(data.ResourceRecordSets, function(route53RecordData) {
return !_.find(data.ResourceRecordSets, function(route53RecordData) {
return route53RecordData.Name === checkForName;
});
});
Expand Down
2 changes: 1 addition & 1 deletion tasks/services/s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ module.exports = function(grunt) {
err.message = 'createBucket:S3.listBuckets: ' + err.message;
return callback(err);
}
var existingBucket = _.detect(data.Buckets, function(bucket){
var existingBucket = _.find(data.Buckets, function(bucket){
return opts.bucket === bucket.Name;
});
if(existingBucket){
Expand Down

0 comments on commit ca60889

Please sign in to comment.