禁止打开非http协议链接

This commit is contained in:
lyswhut
2021-01-26 08:43:07 +08:00
parent 331afc37df
commit d6d6fae2ca
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -232,6 +232,7 @@ export const objectDeepMerge = (target, source, mergedObj) => {
* @param {*} url
*/
export const openUrl = url => {
if (!/^https?:\/\//.test(url)) return
shell.openExternal(url)
}