Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
imjordanxd committed Feb 7, 2025
1 parent 3345be4 commit 38df855
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/makeWebpackConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ module.exports = async (playroomConfig, options) => {
}
);
const { version } = JSON.parse(pkgContents);
isLegacyReact = !(version.startsWith('18') || version.startsWith('19') || version.startsWith('0.0.0'));
isLegacyReact = !(
version.startsWith('18') ||
version.startsWith('19') ||
version.startsWith('0.0.0')
);
} catch (e) {
throw new Error('Unable to read `react-dom` package json');
}
Expand Down
4 changes: 3 additions & 1 deletion src/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import ReactDOM, { version as reactDomVersion } from 'react-dom';
// versions of React is removed.
const canUseNewReactRootApi =
reactDomVersion &&
(reactDomVersion.startsWith('18') || reactDomVersion.startsWith('19') || reactDomVersion.startsWith('0.0.0'));
(reactDomVersion.startsWith('18') ||
reactDomVersion.startsWith('19') ||
reactDomVersion.startsWith('0.0.0'));

export const renderElement = (node, outlet) => {
if (canUseNewReactRootApi) {
Expand Down

0 comments on commit 38df855

Please sign in to comment.