Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
deebloo committed Jan 14, 2025
1 parent dc41d8d commit 748a800
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/di/src/lib/inject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ export function inject<This extends object, T>(
const injector = injectables.get(this);

if (injector === undefined) {
const name = this.constructor.name;

throw new Error(
`${name} is either not injectable or a service is being called in the constructor. \n Either add the @injectable() to your class or use the @injected callback method.`,
`${this.constructor.name} is either not injectable or a service is being called in the constructor. \n Either add the @injectable() to your class or use the @injected callback method.`,
);
}

Expand Down

0 comments on commit 748a800

Please sign in to comment.