Fix localhost windows opening (#2331)

This commit is contained in:
Geometrically
2024-08-28 23:21:35 -07:00
committed by GitHub
parent acf26940d6
commit 016c3d779b
6 changed files with 8 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "@modrinth/app-frontend",
"private": true,
"version": "0.8.3",
"version": "0.8.4",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -173,7 +173,8 @@ document.querySelector('body').addEventListener('click', function (e) {
['http://', 'https://', 'mailto:', 'tel:'].some((v) => target.href.startsWith(v)) &&
!target.classList.contains('router-link-active') &&
!target.href.startsWith('http://localhost') &&
!target.href.startsWith('https://tauri.localhost')
!target.href.startsWith('https://tauri.localhost') &&
!target.href.startsWith('http://tauri.localhost')
) {
open(target.href)
}