From 3c5d2af8c8341ef78236ef38153ed0b4f20c5cac Mon Sep 17 00:00:00 2001 From: KernelDeimos Date: Fri, 18 Oct 2024 15:53:16 -0400 Subject: [PATCH] fix: small issue in Service.js --- src/putility/src/concepts/Service.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/putility/src/concepts/Service.js b/src/putility/src/concepts/Service.js index 30668d361..b914b5986 100644 --- a/src/putility/src/concepts/Service.js +++ b/src/putility/src/concepts/Service.js @@ -33,6 +33,11 @@ class Service extends AdvancedBase { static IMPLEMENTS = { [TService]: { init (...a) { + if ( this._.init_hooks ) { + for ( const hook of this._.init_hooks ) { + hook.call(this); + } + } if ( ! this._init ) return; return this._init(...a); }, @@ -41,6 +46,9 @@ class Service extends AdvancedBase { for ( const k in o ) this.$parameters[k] = o[k]; if ( ! this._construct ) return; return this._construct(o); + }, + get_depends () { + return this.get_depends?.() ?? []; } } }