File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ By default `prism-react-renderer` only includes a [base set of languages](https:
128128``` js
129129import { Highlight , Prism } from " prism-react-renderer" ;
130130
131- typeof window !== " undefined" && ( window .Prism = Prism)
131+ ( typeof global !== " undefined" ? global : window ) .Prism = Prism
132132await import (" prismjs/components/prism-applescript" )
133133/** or **/
134134require (" prismjs/components/prism-applescript" )
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { useState } from "react"
66import { sampleCode } from "./sample-code"
77
88// Example of importing a custom language directly from Prism
9- typeof window !== "undefined" && ( window . Prism = Prism )
9+ ; ( typeof global !== "undefined" ? global : window ) . Prism = Prism
1010// eslint-disable-next-line @typescript-eslint/ban-ts-comment
1111// @ts -ignore
1212await import ( "prismjs/components/prism-applescript" )
You can’t perform that action at this time.
0 commit comments