triggerdotdev / jsonhero-web

JSON Hero is an open-source, beautiful JSON explorer for the web that lets you browse, search and navigate your JSON files at speed. 🚀. Built with 💜 by the Trigger.dev team.
https://jsonhero.io
Apache License 2.0
9.42k stars 512 forks source link

fix: 🐛 handle the array use case first in the stableJson util #175

Closed SSHari closed 11 months ago

SSHari commented 11 months ago

PR to fix #174

I moved the array handling to the start of the stableJson utility. The way it was previously written could result in an array falling into the if (typeof json === "object" && json !== null && keyOrder.length > 0) block because an array is still technically an object.