fix(bridge): remove falsy values from created and mounted (#2182)

This commit is contained in:
Mohammad Saleh Fadaei 2021-11-29 14:44:44 +03:30 committed by GitHub
parent ad2918195b
commit ae6f095ee8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {