From ae6f095ee88110852f5e6ba9e1f11d97769a54e4 Mon Sep 17 00:00:00 2001 From: Mohammad Saleh Fadaei <54557683+ms-fadaei@users.noreply.github.com> Date: Mon, 29 Nov 2021 14:44:44 +0330 Subject: [PATCH] fix(bridge): remove falsy values from `created` and `mounted` (#2182) --- packages/bridge/src/runtime/app.plugin.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bridge/src/runtime/app.plugin.mjs b/packages/bridge/src/runtime/app.plugin.mjs index 5d58f11b85..159e000092 100644 --- a/packages/bridge/src/runtime/app.plugin.mjs +++ b/packages/bridge/src/runtime/app.plugin.mjs @@ -49,11 +49,11 @@ export default (ctx, inject) => { nuxtApp.callHook = nuxtApp.hooks.callHook if (!Array.isArray(ctx.app.created)) { - ctx.app.created = [ctx.app.created] + ctx.app.created = [ctx.app.created].filter(Boolean) } if (!Array.isArray(ctx.app.mounted)) { - ctx.app.mounted = [ctx.app.mounted] + ctx.app.mounted = [ctx.app.mounted].filter(Boolean) } if (process.server) {