瀏覽代碼

fix: replaces only the first occurrence of '&'

Hintay 6 月之前
父節點
當前提交
18b36e6ef9
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/src/lib/helper/index.ts

+ 1 - 1
app/src/lib/helper/index.ts

@@ -47,7 +47,7 @@ function urlJoin(...args: string[]) {
     .replace(/^file:/, 'file:/')
     .replace(/\/(\?|&|#[^!])/g, '$1')
     .replace(/\?/g, '&')
-    .replace('&', '?')
+    .replaceAll('&', '?')
 }
 
 function fromNow(t: string) {