From e93a26aeb96a7b6ded05e3bf352a5252db393c8c Mon Sep 17 00:00:00 2001 From: Giulia <53873910+GiuliCler@users.noreply.github.com> Date: Sat, 13 Feb 2021 12:06:48 +0100 Subject: [PATCH] fix on isExternal function --- src/core/fetch/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/fetch/index.js b/src/core/fetch/index.js index 0fac23bee..963a6bf0d 100644 --- a/src/core/fetch/index.js +++ b/src/core/fetch/index.js @@ -26,14 +26,14 @@ function isExternal(url) { ); if ( typeof match[1] === 'string' && - match[1].length > 0 && + match[1].length >= 0 && match[1].toLowerCase() !== location.protocol ) { return true; } if ( typeof match[2] === 'string' && - match[2].length > 0 && + match[2].length >= 0 && match[2].replace( new RegExp( ':(' + { 'http:': 80, 'https:': 443 }[location.protocol] + ')?$'