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

response == "ok" fails because of line break in "ok" string #61

Open
7-mb opened this issue Mar 11, 2018 · 0 comments
Open

response == "ok" fails because of line break in "ok" string #61

7-mb opened this issue Mar 11, 2018 · 0 comments

Comments

@7-mb
Copy link

7-mb commented Mar 11, 2018

Hi,

when I updated cell values, success was always false so I had to refresh the page to see the new value. The problem was that the response string "ok" always contained a line brake like

"ok
"

After I replaced

var success = onResponse ? onResponse(response) : (response == "ok" || !isNaN(parseInt(response)));

by

var success = onResponse ? onResponse(response) : (response.includes("ok") || !isNaN(parseInt(response)));

it worked for me.

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