You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Union methods frequently use this in their implementations. Calling them with a different context breaks them:
constfs=require('fs');constufs=new(require('unionfs').Union);[].find(fs.existsSync);// undefined[].find(ufs.existsSync);// TypeError: Cannot read property 'fss' of undefinedfs.existsSync.call(null,'foo')// falseufs.existsSync.call(null,'foo')// TypeError: Cannot read property 'fss' of null
While this might be a questionable approach, this behaviour breaks unionfs compatibility with native fs. In my case this error originated from a different package in test environment where unionfs was mocking real fs.
The text was updated successfully, but these errors were encountered:
Union methods frequently use
this
in their implementations. Calling them with a different context breaks them:While this might be a questionable approach, this behaviour breaks unionfs compatibility with native fs. In my case this error originated from a different package in test environment where unionfs was mocking real fs.
The text was updated successfully, but these errors were encountered: