Skip to content

Commit

Permalink
fix(aspects): return an empty object from a plugin auto generated pro…
Browse files Browse the repository at this point in the history
…vider (#7095)

## Proposed Changes

- This prevents harmony from throwing an error when trying to
`harmony.get(pluginComponentId)`
- This will fix an issue with forking a component that uses the new env
format (env plugin with *.bit-env.* file)
  • Loading branch information
GiladShoham authored Feb 27, 2023
1 parent 670d80e commit 1a7d580
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scopes/harmony/aspect-loader/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ export class Plugins {
return this.registerPluginWithTryCatch(plugin, aspect);
})
);
// Return an empty object so haromny will have something in the extension instance
// otherwise it will throw an error when trying to access the extension instance (harmony.get)
return {};
},
runtime,
// dependencies: this.computeDependencies(runtime)
Expand Down

0 comments on commit 1a7d580

Please sign in to comment.