mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-22 07:56:57 +00:00
Add global flag to regex
This commit is contained in:
1 parent
db1fdca3ab
commit
e3619bb1fc
1 file changed
+1
-1
@@ -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