1
0
mirror of https://github.com/zumbiepig/MineXLauncher.git synced 2025-06-08 09:24:48 +00:00

prefix local storage key with v2

Signed-off-by: zumbiepig <121742281+zumbiepig@users.noreply.github.com>
This commit is contained in:
zumbiepig 2024-09-20 15:09:22 -07:00 committed by GitHub
parent a988fc525b
commit 9c731da078
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -411,7 +411,7 @@ const article = {
const storage = {
local: {
get: function (key: string) {
const item = localStorage.getItem('minexlauncher');
const item = localStorage.getItem('minexlauncher-v2');
if (item !== null) {
const json = JSON.parse(base64Gzip.decompress(item));
if (json[key] !== undefined) {
@ -425,7 +425,7 @@ const storage = {
key: string,
value: string | number | object | boolean | null | undefined,
) {
const item = localStorage.getItem('minexlauncher');
const item = localStorage.getItem('minexlauncher-v2');
if (item === null) {
const json: Record<string, unknown> = {};
json[key] = value;
@ -445,7 +445,7 @@ const storage = {
},
session: {
get: function (key: string) {
const item = sessionStorage.getItem('minexlauncher');
const item = sessionStorage.getItem('minexlauncher-v2');
if (item !== null) {
const json = JSON.parse(base64Gzip.decompress(item));
if (json[key] !== undefined) {
@ -459,7 +459,7 @@ const storage = {
key: string,
value: string | number | object | boolean | null | undefined,
) {
const item = sessionStorage.getItem('minexlauncher');
const item = sessionStorage.getItem('minexlauncher-v2');
if (item === null) {
const json: Record<string, unknown> = {};
json[key] = value;