Skip to content

Commit

Permalink
Fix for possible infinite recursion. (#580)
Browse files Browse the repository at this point in the history
  • Loading branch information
zemadz authored and es128 committed Apr 26, 2017
1 parent 2442f7b commit f03f332
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ FSWatcher.prototype._getWatchedDir = function(directory) {
if (!(dir in this._watched)) this._watched[dir] = {
_items: Object.create(null),
add: function(item) {
if (item !== '.') this._items[item] = true;
if (item !== '.' && item !== '..') this._items[item] = true;
},
remove: function(item) {
delete this._items[item];
Expand Down

0 comments on commit f03f332

Please sign in to comment.