cannot use global plugins. value was undefined on the added node component
See original GitHub issueI am trying to use my global plugins in the node added in the drawflow but the instance of it are all undefined
This is only happening on the node so I suspect its the library. Any solution on this?
BTW, I’m using nuxt so I’m thinking if this is also a problem only in Nuxt since we pass the Vue instance on initializing the code like below
this.editor = new Drawflow(this.$refs.drawflow, Vue)
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Angular 7: Uncaught ReferenceError: global is not defined ...
When I googled it everyone says to add this (window as any).global = window; to pollyfills.ts I have done this and I still...
Read more >scenegraph · Adobe XD Plugin Reference
Typically, you access scenegraph nodes via the selection argument that is passed to ... For other nodes, this property returns undefined and cannot...
Read more >How to Bundle JavaScript With Rollup — Step-by-Step Tutorial
Learn how to use Rollup as a smaller, more efficient alternative to webpack and Browserify to bundle JavaScript files in this step-by-step tutorial...
Read more >Plugins directory - Nuxt
The plugins directory contains your Javascript plugins that you want to run before instantiating the root Vue.js Application.
Read more >How to solve "window is not defined" errors in React and Next.js
While you can't use: if (window !== undefined) { // browser code }. Because this would try to compare a non-existent variable (window)...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
changes at line 2
constructor(container, render = null, parent = null) {
added at line 34
this.parent = parent
added at line 1381
parent: this.parent,
now, the drawflow can be initialize as
const editor = new Drawflow(this.$refs.drawflow, Vue, this)
, wherethis
is the component contextI am not sure how to do this in Vue 3 so I’ll leave it up to you 😃
Update version to 0.0.50 new method for vue3 view https://github.com/jerosoler/Drawflow/issues/274#issuecomment-946454633