Skip to content

Commit

Permalink
fix(Issue 827): Don't use fsevents if API is changed (related to 2 ve…
Browse files Browse the repository at this point in the history
…rsion).
  • Loading branch information
JSMonk committed Aug 7, 2019
1 parent 5363bbe commit 2aea3b1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/fsevents-handler.js
Expand Up @@ -164,9 +164,11 @@ const couldConsolidate = (path) => {

return false;
};

const isConstructor = ({ prototype }) =>
prototype !== undefined && prototype.constructor !== undefined;
// returns boolean indicating whether fsevents can be used
const canUse = () => fsevents && FSEventsWatchers.size < 128;
const canUse = () =>
fsevents && FSEventsWatchers.size < 128 && isConstructor(fsevents);

// determines subdirectory traversal levels from root to path
const depth = (path, root) => {
Expand Down

0 comments on commit 2aea3b1

Please sign in to comment.