chore: lint

This commit is contained in:
Daniel Roe 2025-02-20 21:00:07 +00:00
parent 93750ca200
commit 86c960c6f4
No known key found for this signature in database
GPG Key ID: CBC814C393D93268
3 changed files with 3 additions and 5 deletions

View File

@ -20,7 +20,7 @@ export interface LoadNuxtOptions extends LoadNuxtConfigOptions {
export async function loadNuxt (opts: LoadNuxtOptions): Promise<Nuxt> {
// Backward compatibility
opts.cwd = opts.cwd || opts.rootDir
opts.cwd ||= opts.rootDir
opts.overrides ||= opts.config || {}
// Apply dev as config override

View File

@ -83,9 +83,7 @@ function _defineNuxtModule<
// Module format is always a simple function
async function normalizedModule (this: any, inlineOptions: Partial<TOptions>, nuxt: Nuxt): Promise<ModuleSetupReturn> {
if (!nuxt) {
nuxt = tryUseNuxt() || this.nuxt /* invoked by nuxt 2 */
}
nuxt ||= tryUseNuxt() || this.nuxt /* invoked by nuxt 2 */
// Avoid duplicate installs
const uniqueKey = module.meta.name || module.meta.configKey

View File

@ -387,7 +387,7 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) {
// Add backward-compatible middleware to respect `x-nuxt-no-ssr` header
if (nuxt.options.experimental.respectNoSSRHeader) {
nitroConfig.handlers = nitroConfig.handlers || []
nitroConfig.handlers ||= []
nitroConfig.handlers.push({
handler: resolve(distDir, 'core/runtime/nitro/no-ssr'),
middleware: true,