This might be a long shot, but I cannot figure out what is going wrong. Hopefully somebody can give me some directions.
I am using the vue quick edit plugin : https://github.com/A1rPun/vue-quick-edit in my Nuxt project.
Sometimes I will get the error popped up:
[Vue warn]: Error in beforeCreate hook: "ReferenceError: document is not defined"
This seems to happen only the first time I load in the page (unconfirmed!), and afterwards it never happens again (using ctrl+F5, loading in incognito, trying in another browser, ...), it just never shows again and the library works perfectly.
However, it got me hesitating on using the library, since i'm unsure where the error is coming from and if it might impact my end users.
This is the component i created for using the inline editable field:
<template>
<quick-edit
:aria-label="label"
@input="updateValue"
/>
</template>
<script>
import QuickEdit from 'vue-quick-edit'
export default {
components: { QuickEdit },
props: {
label: {
type: String,
required: true,
},
},
methods: {
updateValue (event) {
// do something
},
},
}
</script>
<style lang="scss" scoped>
</style>