Skip to content

Commit 3c5d2af

Browse files
committed
fix: small issue in Service.js
1 parent 29f5820 commit 3c5d2af

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/putility/src/concepts/Service.js

+8
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ class Service extends AdvancedBase {
3333
static IMPLEMENTS = {
3434
[TService]: {
3535
init (...a) {
36+
if ( this._.init_hooks ) {
37+
for ( const hook of this._.init_hooks ) {
38+
hook.call(this);
39+
}
40+
}
3641
if ( ! this._init ) return;
3742
return this._init(...a);
3843
},
@@ -41,6 +46,9 @@ class Service extends AdvancedBase {
4146
for ( const k in o ) this.$parameters[k] = o[k];
4247
if ( ! this._construct ) return;
4348
return this._construct(o);
49+
},
50+
get_depends () {
51+
return this.get_depends?.() ?? [];
4452
}
4553
}
4654
}

0 commit comments

Comments
 (0)