Skip to content
This repository was archived by the owner on Dec 30, 2022. It is now read-only.

fix(nuxt): only write $nuxt if it's writable #1117

Merged
merged 4 commits into from
Sep 7, 2022
Merged

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Feb 28, 2022

In some nuxt 2 cases (acda293#commitcomment-67430759) this.$nuxt is already defined by the framework, but not a setter, so we can't make it equal to the $nuxt of the component.

Luckily in Nuxt 2, setting $nuxt isn't crucial, and can thus be skipped.

In some nuxt 2 cases (acda293#commitcomment-67430759) this.$nuxt is already defined by the framework, but not a setter, so we can't make it equal to the $nuxt of the component.

Luckily in Nuxt 2, setting $nuxt isn't crucial, and can thus be skipped.
@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 28, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 3613f04:

Sandbox Source
vue-instantsearch-e-commerce Configuration

Haroenv referenced this pull request Feb 28, 2022
* fix(nuxt3): forward $nuxt on the instance by default

This is similar to how we forward $router and $store, but in this case it needs to happen before the beforeCreate of nuxt happens

* conditionnel présent
@sjahns sjahns mentioned this pull request Mar 28, 2022
@Haroenv Haroenv marked this pull request as ready for review September 6, 2022 14:20
@Haroenv Haroenv requested a review from dhayab September 6, 2022 16:04
@Haroenv Haroenv merged commit bdecca9 into master Sep 7, 2022
@Haroenv Haroenv deleted the fix/nuxt-2-ssr branch September 7, 2022 07:03
Haroenv added a commit to algolia/instantsearch that referenced this pull request Dec 28, 2022
…ch#1117)

* fix(nuxt): only write $nuxt if it's writable

In some nuxt 2 cases (algolia/vue-instantsearch@7833679#commitcomment-67430759) this.$nuxt is already defined by the framework, but not a setter, so we can't make it equal to the $nuxt of the component.

Luckily in Nuxt 2, setting $nuxt isn't crucial, and can thus be skipped.

* Update src/util/createServerRootMixin.js

* Update src/util/createServerRootMixin.js

Co-authored-by: Dhaya <[email protected]>

Co-authored-by: Dhaya <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants