ribelo / doxa

The Unlicense
232 stars 8 forks source link

Passing a map without an id to the normalize function causes an infinite loop #9

Closed LuisThiamNye closed 3 years ago

LuisThiamNye commented 3 years ago

Example: (dx/normalize {:some :thing})

It seems to me that the loop will keep iterating if an id cannot be inferred, even though there are no more key-value pairs to process. The loop only ends if: (and (not (.hasNext it)) (some? id))

ribelo commented 3 years ago

I fix it. normalize is an internal function and there is no point or need to call it yourself so, in case of no id it must return nil in that case. Thx btw.