conorhastings / conorhastings/react-native-syntax-highlighter

TypeError: value.includes is not a function

Open
#17 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
184
Forks
26
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting index.js around line 39 and the NativeSyntaxHighlighter call at Home.js:154. Reproduce the error through the LongPress path and trace the value passed into the highlighter. Done means the LongPress interaction no longer raises the reported TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.