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

fuels will throw for libraries #2300

Closed
danielbate opened this issue May 14, 2024 · 0 comments · Fixed by #2302
Closed

fuels will throw for libraries #2300

danielbate opened this issue May 14, 2024 · 0 comments · Fixed by #2302
Assignees
Labels
bug Issue is a bug

Comments

@danielbate
Copy link
Member

danielbate commented May 14, 2024

Currently, fuels parses program types, checks them and pushes them to program type member arrays.

const swayMembers = forcToml.workspace.members.map((member) => resolve(workspace, member));
swayMembers.forEach((path) => {
const type = readSwayType(path);
config[`${type}s`].push(path);
});

As it is checking for a key in config, if the key doesn't exist it shall throw:

TypeError: Cannot read properties of undefined (reading 'push')

librarys is not a valid key in config. We should validate the program type before pushing.

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

Successfully merging a pull request may close this issue.

1 participant