Skip to content

Commit

Permalink
Change order of callback arguments, when callback given as defaultValue
Browse files Browse the repository at this point in the history
  • Loading branch information
aedart committed Mar 26, 2024
1 parent ebda22e commit d782a67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/container/src/Container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ export default class Container implements ServiceContainerContract
{
if (!this.has(identifier) && !this.isBuildable(identifier)) {
if (typeof defaultValue === 'function') {
return defaultValue(args, this);
return defaultValue(this, args);
}

return defaultValue as D;
Expand Down

0 comments on commit d782a67

Please sign in to comment.