-
Notifications
You must be signed in to change notification settings - Fork 439
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
clasp run returns 'No response' when Apps Script function returns 0 #770
Comments
Hi Clasp Developer, May i know if there is a solution to this problem? or is it expected behaviour. |
I'm getting the same error with the production version. When it's a string it returns But when I build with
Node version: |
Fixed in next release of 3.x (alpha). Issue was any falsey value was interpreted as no result. Updated to only output no result if the return value is undefined. |
Expected Behavior
When running an Apps Script function, clasp run should return whatever the function returns.
Actual Behavior
When the function returns a 0, clasp run returns 'No response', and the correct output at other values. To force the 0 to be returned, you need to return the type cast String(output).
Steps to Reproduce the Problem
function test() {
return 0;
}
do clasp run test
No response.
Change to
function test() {
return 1;
}
do clasp run test
1
Change to
function test() {
return String(0);
}
0
Specifications
node -v
): 13.8.0clasp -v
): 2.3.0The text was updated successfully, but these errors were encountered: