mirror of
https://github.com/HeyPuter/puter
synced 2024-11-15 06:15:47 +00:00
fix: small issue in Service.js
This commit is contained in:
parent
29f5820129
commit
3c5d2af8c8
@ -33,6 +33,11 @@ class Service extends AdvancedBase {
|
|||||||
static IMPLEMENTS = {
|
static IMPLEMENTS = {
|
||||||
[TService]: {
|
[TService]: {
|
||||||
init (...a) {
|
init (...a) {
|
||||||
|
if ( this._.init_hooks ) {
|
||||||
|
for ( const hook of this._.init_hooks ) {
|
||||||
|
hook.call(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
if ( ! this._init ) return;
|
if ( ! this._init ) return;
|
||||||
return this._init(...a);
|
return this._init(...a);
|
||||||
},
|
},
|
||||||
@ -41,6 +46,9 @@ class Service extends AdvancedBase {
|
|||||||
for ( const k in o ) this.$parameters[k] = o[k];
|
for ( const k in o ) this.$parameters[k] = o[k];
|
||||||
if ( ! this._construct ) return;
|
if ( ! this._construct ) return;
|
||||||
return this._construct(o);
|
return this._construct(o);
|
||||||
|
},
|
||||||
|
get_depends () {
|
||||||
|
return this.get_depends?.() ?? [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user