Commit 6692191 1 parent a69f1d9 commit 6692191 Copy full SHA for 6692191
File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -4,17 +4,18 @@ var Transform = require('readable-stream/transform');
4
4
var rs = require ( 'replacestream' ) ;
5
5
var istextorbinary = require ( 'istextorbinary' ) ;
6
6
7
- module . exports = function ( search , replacement , options ) {
7
+ module . exports = function ( search , _replacement , options ) {
8
8
return new Transform ( {
9
9
objectMode : true ,
10
10
transform : function ( file , enc , callback ) {
11
11
if ( file . isNull ( ) ) {
12
12
return callback ( null , file ) ;
13
13
}
14
14
15
- if ( typeof replacement === 'function' ) {
15
+ var replacement = _replacement ;
16
+ if ( typeof _replacement === 'function' ) {
16
17
// Pass the vinyl file object as this.file
17
- replacement = replacement . bind ( { file : file } ) ;
18
+ replacement = _replacement . bind ( { file : file } ) ;
18
19
}
19
20
20
21
function doReplace ( ) {
You can’t perform that action at this time.
0 commit comments