We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 97e632b commit dea5e75Copy full SHA for dea5e75
2 files changed
src/utils/filter-config.mts
@@ -18,7 +18,7 @@ export type FilterConfig = {
18
}
19
20
export function toFilterConfig(obj: unknown): FilterConfig {
21
- const normalized = Object.create(null) as FilterConfig
+ const normalized = { __proto__: null } as FilterConfig
22
if (!isObject(obj)) {
23
return normalized
24
src/utils/result.mts
@@ -46,7 +46,7 @@ export class ResultError extends Error {
46
*/
47
export function requireOk<T>(result: CResult<T>, context: string): T {
48
if (!result.ok) {
49
- const errorOptions = Object.create(null) as ResultErrorOptions
+ const errorOptions = { __proto__: null } as ResultErrorOptions
50
if (result.code !== undefined) {
51
errorOptions.code = result.code
52
0 commit comments