Skip to content

Commit

Permalink
Fixed clearCache(). (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrumpus committed Oct 27, 2023
1 parent add487b commit c0f9dd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sgp4.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ export function getCacheSizes() {
* Clears SGP caches to free up memory for long-running apps.
*/
export function clearCache() {
caches.forEach((_cache, idx) => {
caches[idx] = {};
caches.forEach((_cache) => {
Object.keys(_cache).forEach(key => delete _cache[key]);
});
}

Expand Down

0 comments on commit c0f9dd1

Please sign in to comment.