Skip to content

Invalid Regex #11

@jamesg31

Description

@jamesg31
Unhandled Rejection (SyntaxError): Invalid regular expression: /?/: Nothing to repeat
strategy
C:/dev/sentiment-analysis-jg/frontend/src/components/TextArea.js:39
  36 | }
  37 | compositeData.push({
  38 |     strategy: (contentBlock, callback) => {
> 39 |         if (contentBlock.getText().search(data[i].text) !== -1) {
     | ^  40 |             callback(contentBlock.getText().search(data[i].text), contentBlock.getText().search(data[i].text) + data[i].text.length);
  41 |         }                
  42 |     },

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions