Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c6b6747

Browse files
authored
fix: on shorthand shouldn't toLowerCase
This repairs an issue where the on shorthand for side effects only supports single case lower case action. repo step https://stackblitz.com/edit/stackblitz-starters-ltqcqj?file=src%2Fmain.ts,src%2Fdata%2Fstate.ts
1 parent 9e2dbc0 commit c6b6747

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/state/actions/src/lib/proxy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export function actionProxyHandler<T extends object, U extends object>({
7171

7272
// the user wants to get a single EventEmitter and trigger a side effect on event emission
7373
if (prop.toString().startsWith('on')) {
74-
const propName = prop.toString().slice(2).toLowerCase() as KeysOfT;
74+
const propName = prop.toString().slice(2) as KeysOfT;
7575
return (
7676
behaviour: OperatorFunction<T[KeysOfT], T[KeysOfT]>,
7777
sf: (v: T[KeysOfT]) => void

0 commit comments

Comments
 (0)