Skip to content

Commit 538c5c1

Browse files
committed
Fix code written based on outdated TypeScript limitation
- Generic spread expressions for object literals are supported by TypeScript: microsoft/TypeScript#28234
1 parent 88d8c66 commit 538c5c1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/base-controller/src/BaseControllerV1.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ export class BaseControllerV1<C extends BaseConfig, S extends BaseState> {
7171
* @param state - Initial state to set on this controller.
7272
*/
7373
constructor(config: Partial<C> = {}, state: Partial<S> = {}) {
74+
this.initialState = { ...(state as S) };
75+
this.initialConfig = { ...(config as C) };
7476
}
7577

7678
/**

0 commit comments

Comments
 (0)