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

fix(replay): Allow Replay to be used in Electron renderers with nodeIntegration enabled #6644

Merged

Conversation

timfish
Copy link
Collaborator

@timfish timfish commented Jan 3, 2023

Closes #6630

In Electron renderers with nodeIntegration enabled, process.type === 'renderer'.

I think this should be ok with bundlers. I think the check below for isNodeEnv uses Object.prototype.toString because bundlers can shim process with an object:

export function isNodeEnv(): boolean {
// explicitly check for browser bundles as those can be optimized statically
// by terser/rollup.
return (
!isBrowserBundle() &&
Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'
);
}

@mydea
Copy link
Member

mydea commented Jan 4, 2023

Sorry, completely missed this before I started to write #6653.

Copy link
Member

@mydea mydea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you 🚀

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.

Allow to capture replays for Electron when node integration is enabled
2 participants