Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in the copyAppMethod #131

Closed
erasse opened this issue Nov 7, 2023 · 3 comments · Fixed by #132
Closed

Typo in the copyAppMethod #131

erasse opened this issue Nov 7, 2023 · 3 comments · Fixed by #132
Assignees

Comments

@erasse
Copy link

erasse commented Nov 7, 2023

Overview of the problem

Buefy version: 0.1.2 (buefy-next)
Vuejs version: 3.3.4
VueRouter version: 4.2.5
OS/Browser: macOS/Chrome

Description

There is a typo in the new copyAppContext method

destContext.provdes = srcContext.provides

should be

destContext.provides = srcContext.provides

This results in several problems like accessing router.

Steps to reproduce

  1. Create a programatically opened modal with an injected component, e.g
 <script>
     this.$buefy.modal.open({
       width: screen.width,
       parent: this,
       component: ChildComponent,
       hasModalCard: true,
       scroll: 'clip',
       canCancel: ['escape', 'outside'],
     });
 </script>

ChildComponent.vue

<template>
<div>
<RouterLink :to='link_from_router'>Click me</RouterLink>
</div>
</template>

<script>
import { RouterLink } from 'vue-router'

export default {
  name: "ChildComponent",
  components: {
    RouterLink
  }
}
</script>

Expected behavior

A new modal with a link inside should open

Actual behavior

An error is thrown:
Injection "Symbol(router)" not found.

Uncaught TypeError: Cannot read properties of undefined (reading 'resolve')
at ReactiveEffect.eval [as fn] (vue-router.mjs:2164:1)

@wesdevpro
Copy link

@erasse Thank you for catching that! I will make sure to add this change to the MigrateToLerna branch

@kikuomax
Copy link
Collaborator

kikuomax commented Nov 8, 2023

@erasse Oops! Good catch!

@wesdevpro
Copy link

@erasse This issue will be fixed in the next release once we finish migrating to Lerna.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants