Skip to content

Commit

Permalink
Remove null usage from setNestedObjectValues
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredpalmer committed Feb 7, 2018
1 parent eb1b26e commit 17f379a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,9 @@ export function setDeep(path: string, value: any, obj: any): any {
export function setNestedObjectValues<T>(
object: any,
value: any,
visited?: any,
response?: any
visited: any = new WeakMap(),
response: any = {}
): T {
visited = visited || new WeakMap();
response = response || {};

for (let k of Object.keys(object)) {
const val = object[k];
if (isObject(val)) {
Expand Down

0 comments on commit 17f379a

Please sign in to comment.