mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 21:55:11 +00:00
fix(bridge): remove falsy values from created
and mounted
(#2182)
This commit is contained in:
parent
ad2918195b
commit
ae6f095ee8
@ -49,11 +49,11 @@ export default (ctx, inject) => {
|
|||||||
nuxtApp.callHook = nuxtApp.hooks.callHook
|
nuxtApp.callHook = nuxtApp.hooks.callHook
|
||||||
|
|
||||||
if (!Array.isArray(ctx.app.created)) {
|
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)) {
|
if (!Array.isArray(ctx.app.mounted)) {
|
||||||
ctx.app.mounted = [ctx.app.mounted]
|
ctx.app.mounted = [ctx.app.mounted].filter(Boolean)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.server) {
|
if (process.server) {
|
||||||
|
Loading…
Reference in New Issue
Block a user