Skip to content

Commit

Permalink
Added coderabbit recommendation
Browse files Browse the repository at this point in the history
  • Loading branch information
SahilDahekar committed Dec 16, 2024
1 parent 8c8c5ab commit 8d30dd1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/editor/CodeBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,9 @@ export default function CodeBlock({
background: '#252f3f'
}}
lineNumberStyle={(lineNumber: number) => {
const isHighlighted = highlightedLines && highlightedLines.includes(lineNumber);
const isHighlighted = highlightedLines?.includes(lineNumber);

const styles = {
const styles: React.CSSProperties = {
display: 'inline-block',
marginLeft: '16px',
paddingRight: '16px',
Expand All @@ -287,7 +287,7 @@ export default function CodeBlock({
}}
wrapLines={true}
lineProps={(lineNumber: number) => {
const isHighlighted = highlightedLines && highlightedLines.includes(lineNumber);
const isHighlighted = highlightedLines?.includes(lineNumber);

const style: React.CSSProperties = {
paddingRight: '2rem'
Expand Down

0 comments on commit 8d30dd1

Please sign in to comment.