We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78dd034 commit cac50abCopy full SHA for cac50ab
packages/prism-react-renderer/src/components/useGetLineProps.ts
@@ -11,8 +11,11 @@ export const useGetLineProps = (themeDictionary?: ThemeDict) =>
11
className: clsx("token-line", className),
12
}
13
14
- if (themeDictionary) output.style = themeDictionary.plain
15
- if (style) output.style = { ...(output.style || {}), ...style }
+ if (typeof themeDictionary === "object" && "plain" in themeDictionary)
+ output.style = themeDictionary.plain
16
+
17
+ if (typeof style === "object")
18
+ output.style = { ...(output.style || {}), ...style }
19
20
return output
21
},
0 commit comments