Skip to content

Commit

Permalink
Fix react-devtools projectRoots parse
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Jul 23, 2023
1 parent 05f42b5 commit 4345db4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion electron/url-handle/handleURL.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const parseUrl = _url => {
const query = {
host: resolveHost(host),
port: Number(port) || 8081,
projectRoots: Array.isArray(projectRoots) ? filterPaths(projectRoots.split(',')) : undefined,
projectRoots: filterPaths(Array.isArray(projectRoots) ? projectRoots : [projectRoots]),
};
return query;
};
Expand Down
3 changes: 2 additions & 1 deletion npm-package/src/injectDevToolsMiddleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ const rnFlags = {
replaceFunc:
"function launchDefaultDebugger(host, port, args = '', skipRNDebugger) {",
funcCall: '(host, port, args, true)',
args: "(host || 'localhost') + '&port=' + port + '&args=' + args",
args: "(host || 'localhost') + '&port=' + port + '&projectRoots=' + process.cwd() + " +
"'&args=' + args",
},
],
};
Expand Down

0 comments on commit 4345db4

Please sign in to comment.