json-to-ts icon indicating copy to clipboard operation
json-to-ts copied to clipboard

fix for the error - Reduce of empty array with no initial value

Open vicke4 opened this issue 2 years ago • 1 comments

Hi,

When a JSON has empty key string, this error occurs as the reduce call in the pascelCase function of getNames module doesn't have a default value.

{
  "a": {
    "": {
      "": ""
    }
  }
}

The above JSON will throw the error.

Fixes #18.

vicke4 avatar Nov 29 '22 07:11 vicke4

@MariusAlch could you please have a look and close this?

vicke4 avatar Dec 09 '22 06:12 vicke4

Fixed with recent commits

MariusAlch avatar Apr 18 '24 19:04 MariusAlch