// lib/core/file.js
function isDirectoryEmpty(path) {
return new Promise((resolve, reject) => {
...
resolve(noFilesPresent, path); // I think this is impossible?
...
});
}
I don't think that native promises can be resolved with more than one value. I would expect path to be lost here without fail. I caught this while trying to experimenting with adding Flow type annotations for some inline documentation.
@chalkers, do you know if that's right? Haven't chased the thread here yet to see what the expected behavior is.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then