Skip to content

Fix cannot set sendRequest on undefined in Next.js apps#782

Open
ShukantPal wants to merge 1 commit intosnowflakedb:masterfrom
ShukantPal:shukant/fix-send-request
Open

Fix cannot set sendRequest on undefined in Next.js apps#782
ShukantPal wants to merge 1 commit intosnowflakedb:masterfrom
ShukantPal:shukant/fix-send-request

Conversation

@ShukantPal
Copy link

Description

It seems like that this.sendRequest was being used to set sendRequest as a global function. But this is undefined when using it in Next.js bundled server-side routes.

This change makes it so that the function can be used in the statement.js file without referencing this.

Checklist

  • Format code according to the existing code style (run npm run lint:check -- CHANGED_FILES and fix problems in changed code)
  • Create tests which fail without the change (if possible)
  • Make all tests (unit and integration) pass (npm run test:unit and npm run test:integration)
  • Extend the README / documentation and ensure is properly displayed (if necessary)
  • Provide JIRA issue id (if possible) or GitHub issue id in commit message

@ShukantPal ShukantPal requested a review from a team as a code owner March 1, 2024 21:58
@github-actions
Copy link

github-actions bot commented Mar 1, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@ShukantPal
Copy link
Author

ShukantPal commented Mar 1, 2024 via email

@ShukantPal
Copy link
Author

recheck

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

Successfully merging this pull request may close these issues.

1 participant