Skip to content

Commit

Permalink
Fix bug isChanged statement does not set properly #14
Browse files Browse the repository at this point in the history
  • Loading branch information
narirou committed May 9, 2015
1 parent 4a9a6ed commit f4271a1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ app.changed = app.restart = function( callback ) {

// already called this function
if( isChanged ) {
isChanged = false;
return done( null, 'Development server already received restart requests.', callback );
}

Expand All @@ -216,16 +215,16 @@ app.changed = app.restart = function( callback ) {
return done( error, gutil.colors.cyan( 'Development server was restarted.' ), callback );
};

isChanged = true;

if( app.child ) {
isChanged = true;
return app.kill( function() {
app.listen( restarted );
});
}

// if server not started, try to start using options.path
else if( app.options.path ) {
isChanged = true;
return app.listen( restarted );
}

Expand Down

0 comments on commit f4271a1

Please sign in to comment.