There is an issue when some functions or properties are added to the Object prototype by some other library.
It will cause finishType to have unexpected values.
I was able to track it down to promise-sftp/lib/promiseSftp.coffee line 443:
# create the methods listed in simplePassthroughMethods as common logic wrapped around the original sshClient method
for name,finishType of simplePassthroughMethods
@[name] = commonLogicFactory(name, finishType)
# wrap the methods listed in complexPassthroughMethods with common logic
for name,finishType of complexPassthroughMethods
@[name] = commonLogicFactory(name, finishType, @[name])
It is being distributed in javascript as:
for (name in simplePassthroughMethods) {
finishType = simplePassthroughMethods[name];
this[name] = commonLogicFactory(name, finishType);
}
for (name in complexPassthroughMethods) {
finishType = complexPassthroughMethods[name];
this[name] = commonLogicFactory(name, finishType, this[name]);
}
The issue would be solved by using Object.keys() instead of for...in, for example.
Hello,
First, thank you for the great module :)
There is an issue when some functions or properties are added to the Object prototype by some other library. It will cause
finishType
to have unexpected values. I was able to track it down to promise-sftp/lib/promiseSftp.coffee line 443:It is being distributed in javascript as:
The issue would be solved by using
Object.keys()
instead offor...in
, for example.Do you think this can be fixed?
Thank you very much, Urbino Pescada