mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
refactor(web): replace String.match() with RegExp.exec() for non-global regex (#32386)
This commit is contained in:
1 parent
41a4a57d2e
commit
00591a592c
18 files changed
+22
-22
No files matched your search
@@ -140,7 +140,7 @@ export class ComponentAnalyzer {
|
||||
|
||||
maxMessages.forEach((msg) => {
|
||||
if (msg.ruleId === 'sonarjs/cognitive-complexity') {
|
||||
const match = msg.message.match(complexityPattern)
|
||||
const match = complexityPattern.exec(msg.message)
|
||||
if (match && match[1])
|
||||
max = Math.max(max, Number.parseInt(match[1], 10))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user