Skip to content

Commit

Permalink
refactor: Slight rename
Browse files Browse the repository at this point in the history
  • Loading branch information
rschristian committed Apr 26, 2024
1 parent 784af46 commit 61ce7a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions debug/src/component-stack.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function getCurrentVNode() {
* location of a component. In that case we just omit that, but we'll
* print a helpful message to the console, notifying the user of it.
*/
let shouldShowJsxSourceWarning = true;
let showJsxSourcePluginWarning = true;

/**
* Check if a `vnode` is a possible owner.
Expand Down Expand Up @@ -87,12 +87,12 @@ export function getOwnerStack(vnode) {
const source = owner.__source;
if (source) {
acc += ` (at ${source.fileName}:${source.lineNumber})`;
} else if (shouldShowJsxSourceWarning) {
} else if (showJsxSourcePluginWarning) {
console.warn(
'Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons.'
);
}
shouldShowJsxSourceWarning = false;
showJsxSourcePluginWarning = false;

return (acc += '\n');
}, '');
Expand Down

0 comments on commit 61ce7a4

Please sign in to comment.