Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined is not an object (evaluting 'topLevel[property]') #25

Open
swapanil opened this issue Aug 5, 2020 · 4 comments
Open

undefined is not an object (evaluting 'topLevel[property]') #25

swapanil opened this issue Aug 5, 2020 · 4 comments

Comments

@swapanil
Copy link

swapanil commented Aug 5, 2020

Simulator Screen Shot - iPhone X - 2020-08-06 at 00 16 00

@AbednegoTM
Copy link

@swapanil Did you get this fixed , I have the same error

@AbednegoTM
Copy link

Fixed this by removing "prism" from the highlighter prop value

BEFORE

<SyntaxHighlighter 
  	language='javascript' 
  	style={docco}
  	highlighter={"prism" || "hljs"}
  >
  	{codeString}
  </SyntaxHighlighter>;  

AFTER

<SyntaxHighlighter 
  	language='javascript' 
  	style={docco}
  	highlighter={"hljs"}
  >
  	{codeString}
  </SyntaxHighlighter>; 

@Desintegrator
Copy link

same. removing "prism" changed nothing

@Desintegrator
Copy link

Solved. My problem was that we cannot use just style name. We need to import appropriate stylesheet file and use it for style prop
Example: import { docco } from 'react-syntax-highlighter/styles/hljs';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants