suggestion to simplify check

pull/869/head
Georges Gomes 3 years ago
parent f72678fe55
commit c7c4d1a782

@ -106,12 +106,7 @@ export function createRouter(
} }
} }
} catch (err: any) { } catch (err: any) {
if ( if (!err.message.match(/fetch/) && !/^[\\/]404(\.html)?$/.test(href)) {
!err.message.match(/fetch/) &&
(siteDataRef.value.cleanUrls
? !href.match(/^[\\/]404$/)
: !href.match(/^[\\/]404\.html$/))
) {
console.error(err) console.error(err)
} }

Loading…
Cancel
Save