mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-06 05:42:40 +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}`)
|
request.get(`/admin/lookup/${this.state.query}`)
|
||||||
.then((res)=>{
|
.then((res)=>{
|
||||||
const foundBrew = res.body;
|
const foundBrew = res.body;
|
||||||
const scriptCheck = foundBrew.text.match(/(<\/?s)cript/);
|
const scriptCheck = foundBrew.text.match(/(<\/?s)cript/g);
|
||||||
this.setState({
|
this.setState({
|
||||||
foundBrew : foundBrew,
|
foundBrew : foundBrew,
|
||||||
scriptCount : scriptCheck?.length || 0,
|
scriptCount : scriptCheck?.length || 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user