mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 18:32:41 +00:00
Add global flag to regex
This commit is contained in:
@@ -31,7 +31,7 @@ const BrewLookup = createClass({
|
||||
request.get(`/admin/lookup/${this.state.query}`)
|
||||
.then((res)=>{
|
||||
const foundBrew = res.body;
|
||||
const scriptCheck = foundBrew.text.match(/(<\/?s)cript/);
|
||||
const scriptCheck = foundBrew.text.match(/(<\/?s)cript/g);
|
||||
this.setState({
|
||||
foundBrew : foundBrew,
|
||||
scriptCount : scriptCheck?.length || 0,
|
||||
|
||||
Reference in New Issue
Block a user