post-install: Fix getting keys of null values Original commit by @honey-tree https://github.com/SillyTavern/SillyTavern/pull/3334/commits/5c40876a4afb928b0b0ea916a7f02ee57234e452
| @@ -73,7 +73,7 @@ const keyMigrationMap = [ | |||
| 73 | * @returns {string[]} Array of all keys in the object | 73 | * @returns {string[]} Array of all keys in the object |
| 74 | */ | 74 | */ |
| 75 | function getAllKeys(obj, prefix = '') { | 75 | function getAllKeys(obj, prefix = '') { |
| 76 | if (typeof obj !== 'object' || Array.isArray(obj)) { | 76 | if (typeof obj !== 'object' || Array.isArray(obj) || obj === null) { |
| 77 | return []; | 77 | return []; |
| 78 | } | 78 | } |
| 79 | 79 | ||