From 036e8430ab4464489b8cabaa2e9b9c73ba082ca5 Mon Sep 17 00:00:00 2001 From: Artem Valeev <48104129+artik19129@users.noreply.github.com> Date: Wed, 21 Aug 2024 00:37:38 +0300 Subject: [PATCH] fix: storage & sessionData flush (#33) * fix: storage & sessionData flush * chore: up package version --- bindings/src/client/statics/Storage.js | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bindings/src/client/statics/Storage.js b/bindings/src/client/statics/Storage.js index 6b7aac7..9c57c54 100644 --- a/bindings/src/client/statics/Storage.js +++ b/bindings/src/client/statics/Storage.js @@ -9,10 +9,10 @@ class _Storage { } flush() { - for (const key in this.#dataCache) - alt.LocalStorage.set(key, this.#dataCache[key]); - for (const key in this.#sessionDataCache) - alt.setMeta(key, this.#sessionDataCache[key]); + for (const [key, value] of this.#dataCache) + alt.LocalStorage.set(key, value); + for (const [key, value] of this.#sessionDataCache) + alt.setMeta(key, value); alt.LocalStorage.save(); } diff --git a/package.json b/package.json index 883b0dc..856af34 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ragemp-altv-bridge", - "version": "1.0.4", + "version": "1.0.5", "description": "RAGE Multiplayer alt:V Bridge. This package provides a bridge between RAGE Multiplayer and alt:V. It allows you to use RAGEMP code in alt:V.", "keywords": [ "ragemp",