### Describe the bug Simply add a `BModal` to a component in a nuxt environment. This line in the `BModal` source will lead to an error 500 during SSR. `const defaultModalDialogZIndex = ref(getModalZIndex(element.value ?? document.body))` > ReferenceError: document is not defined You can see the same error in console when you run the `build` task of this repository. ### Reproduction https://stackblitz.com/edit/nuxt-starter-etta1mtk?file=app.vue ### Used Package Manager pnpm