Skip to content

Commit

Permalink
fix(msw): make sure to not double import value and type
Browse files Browse the repository at this point in the history
  • Loading branch information
AllieJonsson committed Jan 8, 2025
1 parent de20293 commit c8295eb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/core/src/generators/imports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@ export const addDependency = ({

if (types) {
if (values) {
for (let i = types.length - 1; i >= 0; i--) {
if (values.some((v) => v.name === types[i].name)) {
types.splice(i, 1);
}
}
dep += '\n';
}
dep += generateDependency({
Expand Down

0 comments on commit c8295eb

Please sign in to comment.