conorhastings / react-native-syntax-highlighter

a syntax highlighter for react native using https://github.com/conorhastings/react-syntax-highlighter under the hood
MIT License
167 stars 25 forks source link

TypeError: value.includes is not a function #17

Open mateosilguero opened 5 years ago

mateosilguero commented 5 years ago

This error is triggered on LongPress

I think this ocurred in this line: index.js 39 else if (value.includes('em')) {

This error is located at: in NativeSyntaxHighlighter (at Home.js:154) in RCTView (at View.js:45) in View (at TouchableHighlight.js:397) in TouchableHighlight (at Home.js:150) in RCTView (at View.js:45) in View (at Home.js:96) in RCTView (at View.js:45) in View (at ScrollView.js:976) in RCTScrollView (at ScrollView.js:1115) in ScrollView (at Home.js:92) in RCTView (at View.js:45) in View (at Home.js:88) in App (at SceneView.js:9) in SceneView (at StackViewLayout.tsx:888) in RCTView (at View.js:45) in View (at StackViewLayout.tsx:887) in RCTView (at View.js:45) in View (at StackViewLayout.tsx:886) in RCTView (at View.js:45) in View (at createAnimatedComponent.js:151) in AnimatedComponent (at StackViewCard.tsx:93) in RCTView (at View.js:45) in View (at createAnimatedComponent.js:151) in AnimatedComponent (at screens.native.js:59) in Screen (at StackViewCard.tsx:80) in Card (at createPointerEventsContainer.tsx:95) in Container (at StackViewLayout.tsx:971) in RCTView (at View.js:45) in View (at screens.native.js:83) in ScreenContainer (at StackViewLayout.tsx:383) in RCTView (at View.js:45) in View (at createAnimatedComponent.js:151) in AnimatedComponent (at StackViewLayout.tsx:379) in PanGestureHandler (at StackViewLayout.tsx:372) in StackViewLayout (at withOrientation.js:30) in withOrientation (at StackView.tsx:103) in RCTView (at View.js:45) in View (at Transitioner.tsx:267) in Transitioner (at StackView.tsx:40) in StackView (at createNavigator.js:61) in Navigator (at createKeyboardAwareNavigator.js:12) in KeyboardAwareNavigator (at createAppContainer.js:429) in NavigationContainer (at App.js:53) in App (at renderApplication.js:35) in RCTView (at View.js:45) in View (at AppContainer.js:98) in RCTView (at View.js:45) in View (at AppContainer.js:115) in AppContainer (at renderApplication.js:34)

index.js:58:23 Array.reduce 7719a008-43c3-4a08-bc7a-1eaf2075b32c:112916:56 Array.reduce generateNewStylesheet 7719a008-43c3-4a08-bc7a-1eaf2075b32c:112911:55 NativeSyntaxHighlighter 7719a008-43c3-4a08-bc7a-1eaf2075b32c:113069:33 renderWithHooks 7719a008-43c3-4a08-bc7a-1eaf2075b32c:27628:24 updateFunctionComponent 7719a008-43c3-4a08-bc7a-1eaf2075b32c:29108:26 beginWork 7719a008-43c3-4a08-bc7a-1eaf2075b32c:29933:22 performUnitOfWork 7719a008-43c3-4a08-bc7a-1eaf2075b32c:33325:18