Answer the question
In order to leave comments, you need to log in
bug in nuxt on server?
We put the application in production and one user has an error
[nuxt] Error while initializing app DOMException: Failed to execute 'appendChild' on 'Node': This node type does not support this method.
<div class="form-block" v-if="$store.state.language === 'ru'">
<label>Zip code *</label>
</div>
...
state: () => ({
language: 'en',
}),
actions: {
nuxtServerInit ({ commit }, { req }) {
let language = 'en';
if (req.headers['accept-language']) {
if (req.headers['accept-language'].toLowerCase().indexOf('ru') > -1) {
language = 'ru';
}
}
commit('setLanguage', language);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question