diff --git a/package.json b/package.json index add8b980..81432703 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "linkfs", - "version": "2.0.1", + "version": "2.0.2", "description": "Rewrites filesystem paths", "main": "lib/index.js", "keywords": [ diff --git a/src/index.ts b/src/index.ts index 144c31e1..bea012e4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -119,7 +119,7 @@ export function link(fs, rewrites: string[] | string[][]): any { // If first argument is not a path, just proxy the function. if((typeof path !== 'string') && !Buffer.isBuffer(path)) { - if(!require('url') || !(path instanceof require('url').URL)) + if(!require('url').URL || !(path instanceof require('url').URL)) return func.apply(fs, args); }