Skip to content

Commit db5a8fc

Browse files
committed
Renamed variables after PR Review
- `hasLayout` -> `hasInternalLayout` - `consequent` -> `result`
1 parent a5cf6a0 commit db5a8fc

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/mdx/lib/plugin/recma-document.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -481,10 +481,10 @@ export function recmaDocument(options = {}) {
481481

482482
/**
483483
* @param {Expression} [content]
484-
* @param {boolean} [hasLayout]
484+
* @param {boolean} [hasInternalLayout]
485485
* @returns {FunctionDeclaration[]}
486486
*/
487-
function createMdxContent(content, hasLayout) {
487+
function createMdxContent(content, hasInternalLayout) {
488488
/** @type {JSXElement} */
489489
const element = {
490490
type: 'JSXElement',
@@ -524,13 +524,13 @@ export function recmaDocument(options = {}) {
524524
}
525525

526526
// @ts-expect-error: JSXElements are expressions.
527-
let consequent = /** @type {Expression} */ (element)
527+
let result = /** @type {Expression} */ (element)
528528

529-
if (!hasLayout) {
530-
consequent = {
529+
if (!hasInternalLayout) {
530+
result = {
531531
type: 'ConditionalExpression',
532532
test: {type: 'Identifier', name: 'MDXLayout'},
533-
consequent,
533+
result,
534534
alternate: {
535535
type: 'CallExpression',
536536
callee: {type: 'Identifier', name: '_createMdxContent'},
@@ -580,7 +580,7 @@ export function recmaDocument(options = {}) {
580580
body: [
581581
{
582582
type: 'ReturnStatement',
583-
argument: consequent
583+
argument: result
584584
}
585585
]
586586
}

0 commit comments

Comments
 (0)