snowflake-connector-nodejs icon indicating copy to clipboard operation
snowflake-connector-nodejs copied to clipboard

Fix cannot set sendRequest on undefined in Next.js apps

Open ShukantPal opened this issue 11 months ago • 3 comments

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 avatar Mar 01 '24 21:03 ShukantPal

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

github-actions[bot] avatar Mar 01 '24 21:03 github-actions[bot]

I have read the CLA Document and I hereby sign the CLA

ShukantPal avatar Mar 01 '24 22:03 ShukantPal

recheck

ShukantPal avatar Mar 02 '24 02:03 ShukantPal