From e3619bb1fc29d261753f6e01f87df0538703a0eb Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Fri, 25 Oct 2024 00:11:02 +1300 Subject: [PATCH] Add global flag to regex --- client/admin/brewUtils/brewLookup/brewLookup.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/admin/brewUtils/brewLookup/brewLookup.jsx b/client/admin/brewUtils/brewLookup/brewLookup.jsx index 922613559..8814e465a 100644 --- a/client/admin/brewUtils/brewLookup/brewLookup.jsx +++ b/client/admin/brewUtils/brewLookup/brewLookup.jsx @@ -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,