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

ReferenceError: b is not defined #1

Open
joudinet opened this issue Jul 2, 2020 · 5 comments
Open

ReferenceError: b is not defined #1

joudinet opened this issue Jul 2, 2020 · 5 comments

Comments

@joudinet
Copy link

joudinet commented Jul 2, 2020

b = this.unusedBlossoms.pop();

I think there is a missing var at the beginning of this line, to declare the variable b.
Otherwise, using this code as a module of mine, I got a reference error on Chrome.

@joudinet
Copy link
Author

joudinet commented Jul 2, 2020

Same reference error for the path variable few lines below:

path = this.blossomChilds[b] = [];

@joudinet
Copy link
Author

joudinet commented Jul 2, 2020

And another one in:

v = leaves[jj];

joudinet added a commit to joudinet/swiss-system that referenced this issue Jul 7, 2020
The app is raw but works. Carefull when used on Chrome, the edmonds-blossom extension
requires some modifications to fix any undeclared variables. See the corresponding
issue: mattkrick/EdmondsBlossom#1
@VenierGiacomo
Copy link

Hey @joudinet, did you manage to fix it?

@joudinet
Copy link
Author

Hi @VenierGiacomo . I did fix it but this was a longtime ago and I don't remember how exactly I did it.
Either I modified directly the code on the node_modules directory to declare the missing variables (i.e., the ugly way), or I found a way to load the module so that it works.
In my code, I see that I do the following : import Blossom from 'edmonds-blossom' in the script part of my Vue component and the package.json file contains the following dependency : "edmonds-blossom": "^1.0.0". Then I simply call Blossom(data);.
Hope it helps you.

@VenierGiacomo
Copy link

Hey @joudinet thanks, a lot!
In the end I just copy pasted the code from the blossom.js file into my project and added the variable declaration for the missing variables. So far it seem to be working.

Thank again

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

No branches or pull requests

2 participants