Commit 513ccb954317c9cbe2d1697cbeb0720669496781

Authored by 无木
1 parent e962fa03

fix(route): url with hash not work. fixed #2301 #1311 #1253

Showing 1 changed file with 1 additions and 2 deletions
src/utils/is.ts
@@ -93,7 +93,6 @@ export const isServer = typeof window === 'undefined'; @@ -93,7 +93,6 @@ export const isServer = typeof window === 'undefined';
93 export const isClient = !isServer; 93 export const isClient = !isServer;
94 94
95 export function isUrl(path: string): boolean { 95 export function isUrl(path: string): boolean {
96 - const reg =  
97 - /^(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?(\/#\/)?(?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/; 96 + const reg = /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/;
98 return reg.test(path); 97 return reg.test(path);
99 } 98 }