fix(nuxt): don't use or assignment (#8299)

This commit is contained in:
Daniel Roe 2022-10-19 08:55:32 +01:00 committed by GitHub
parent aa76d7bbac
commit d3f3f9f348
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,7 @@ export async function preloadRouteComponents (to: string, router: Router & { _ro
if (router._routePreloaded.has(to)) { return }
router._routePreloaded.add(to)
const promises = router._preloadPromises ||= []
const promises = router._preloadPromises = router._preloadPromises || []
if (promises.length > 4) {
// Defer adding new preload requests until the existing ones have resolved