post-install: Fix getting keys of null values

Original commit by @honey-tree
5c40876a4a
This commit is contained in:
Cohee 2025-01-22 22:41:34 +02:00
parent ae29f06e44
commit 7c93acedc3

View File

@ -73,7 +73,7 @@ const keyMigrationMap = [
* @returns {string[]} Array of all keys in the object
*/
function getAllKeys(obj, prefix = '') {
if (typeof obj !== 'object' || Array.isArray(obj)) {
if (typeof obj !== 'object' || Array.isArray(obj) || obj === null) {
return [];
}