Skip to content

Commit

Permalink
fix regex
Browse files Browse the repository at this point in the history
Signed-off-by: Xuhui zhang <[email protected]>
  • Loading branch information
zxh326 committed Nov 8, 2024
1 parent db114f0 commit 0a33f0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dashboard-ui-v2/src/components/upgrade-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const UpgradeModal: React.FC<{
onMessage: async (msg) => {
setData((prev) => prev + msg.data)
if (msg.data.includes('SUCCESS Upgrade mount pod and recreate one: ')) {
const regex = /SUCCESS Upgrade mount pod and recreate one: (.+)"/
const regex = /SUCCESS Upgrade mount pod and recreate one: ([a-zA-Z0-9\-]+)"/

Check failure on line 59 in dashboard-ui-v2/src/components/upgrade-modal.tsx

View workflow job for this annotation

GitHub Actions / build

Unnecessary escape character: \-
const match = msg.data.match(regex)

if (match && match[1]) {
Expand Down

0 comments on commit 0a33f0a

Please sign in to comment.