Skip to content

Commit

Permalink
fix(module): add config builder callback args to process config method (
Browse files Browse the repository at this point in the history
  • Loading branch information
asbjornhaland authored Jun 7, 2023
1 parent 8e7c912 commit 060818e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/rotten-walls-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@equinor/fusion-framework-module": patch
---

fix(module): add config builder callback args to process config method so that
7 changes: 5 additions & 2 deletions packages/modules/module/src/BaseConfigBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export abstract class BaseConfigBuilder<TConfig = unknown> {
initial?: Partial<TConfig>
): Observable<TConfig> {
return this._buildConfig(init, initial).pipe(
mergeMap((config) => this._processConfig(config))
mergeMap((config) => this._processConfig(config, init))
);
}

Expand Down Expand Up @@ -192,7 +192,10 @@ export abstract class BaseConfigBuilder<TConfig = unknown> {
* can be used for adding required config attributes which might not been
* added config callbacks for
*/
protected _processConfig(config: Partial<TConfig>): ObservableInput<TConfig> {
protected _processConfig(
config: Partial<TConfig>,
_init: ConfigBuilderCallbackArgs
): ObservableInput<TConfig> {
return of(config as TConfig);
}
}

0 comments on commit 060818e

Please sign in to comment.