Skip to content

Commit

Permalink
Ensure backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Bertrand Paquet committed Oct 7, 2012
1 parent 4525ddf commit 9d7969b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/lib/monitor_file.js
Expand Up @@ -114,7 +114,7 @@ MonitoredFile.prototype.restart = function(start_index) {
if (err) {
return this.emit('error', err);
}
if (file_status[this.filename]) {
if (file_status[this.filename] && file_status[this.filename].last_data && file_status[this.filename].index) {
var last_data = file_status[this.filename].last_data;
if (file_status[this.filename].index >= last_data.length && stats.size > last_data.length) {
var buffer = new Buffer(last_data.length);
Expand Down

0 comments on commit 9d7969b

Please sign in to comment.