Skip to content

Commit

Permalink
(fix) Context: use namespace as value rather than as string (#1122)
Browse files Browse the repository at this point in the history
  • Loading branch information
kb019 authored Aug 23, 2024
1 parent 362d430 commit e2c15d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/framework/esm-context/src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function registerContext<T extends {} = {}>(namespace: string, initialVal
);
}

return Object.assign({}, state, { namespace: initialValue === nothing ? {} : initialValue });
return Object.assign({}, state, { [namespace]: initialValue === nothing ? {} : initialValue });
});
}

Expand Down

0 comments on commit e2c15d2

Please sign in to comment.