Skip to content

Commit

Permalink
fix(modify): allow objects for patches
Browse files Browse the repository at this point in the history
  • Loading branch information
RWOverdijk committed Oct 10, 2017
1 parent 5f81e17 commit 331f961
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/step/modify.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ module.exports = ({modify} = null, stream) => {
return stream;
}

const {patch} = modify;
let {patch} = modify;

if (!Array.isArray(patch)) {
patch = [patch];
}

patch.forEach(({pattern, append, prepend, custom}) => {
stream = stream.pipe(applyModification(pattern, {append, prepend, custom}));
Expand Down

0 comments on commit 331f961

Please sign in to comment.