Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retrieveFile interprets empty string as "no response" #33

Open
cspotcode opened this issue Oct 16, 2021 · 0 comments
Open

retrieveFile interprets empty string as "no response" #33

cspotcode opened this issue Oct 16, 2021 · 0 comments

Comments

@cspotcode
Copy link
Owner

cspotcode commented Oct 16, 2021

var retrieveFile = handlerExec(sharedData.retrieveFileHandlers, sharedData.internalRetrieveFileHandlers);

function handlerExec(list, internalList) {
return function(arg) {
for (var i = 0; i < list.length; i++) {
var ret = list[i](arg);
if (ret) {
return ret;
}

If a file is empty, retrieveFile can return empty string. This is falsey, and today is erroneously interpreted as "no response," causing subsequent retrieveFile handlers to be invoked.

We can change retrieveFile to allow returning undefined and fix the logic to interpret empty string as empty file.

Note: Is a breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant