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:
parent
a988fc525b
commit
9c731da078
@ -411,7 +411,7 @@ const article = {
|
|||||||
const storage = {
|
const storage = {
|
||||||
local: {
|
local: {
|
||||||
get: function (key: string) {
|
get: function (key: string) {
|
||||||
const item = localStorage.getItem('minexlauncher');
|
const item = localStorage.getItem('minexlauncher-v2');
|
||||||
if (item !== null) {
|
if (item !== null) {
|
||||||
const json = JSON.parse(base64Gzip.decompress(item));
|
const json = JSON.parse(base64Gzip.decompress(item));
|
||||||
if (json[key] !== undefined) {
|
if (json[key] !== undefined) {
|
||||||
@ -425,7 +425,7 @@ const storage = {
|
|||||||
key: string,
|
key: string,
|
||||||
value: string | number | object | boolean | null | undefined,
|
value: string | number | object | boolean | null | undefined,
|
||||||
) {
|
) {
|
||||||
const item = localStorage.getItem('minexlauncher');
|
const item = localStorage.getItem('minexlauncher-v2');
|
||||||
if (item === null) {
|
if (item === null) {
|
||||||
const json: Record<string, unknown> = {};
|
const json: Record<string, unknown> = {};
|
||||||
json[key] = value;
|
json[key] = value;
|
||||||
@ -445,7 +445,7 @@ const storage = {
|
|||||||
},
|
},
|
||||||
session: {
|
session: {
|
||||||
get: function (key: string) {
|
get: function (key: string) {
|
||||||
const item = sessionStorage.getItem('minexlauncher');
|
const item = sessionStorage.getItem('minexlauncher-v2');
|
||||||
if (item !== null) {
|
if (item !== null) {
|
||||||
const json = JSON.parse(base64Gzip.decompress(item));
|
const json = JSON.parse(base64Gzip.decompress(item));
|
||||||
if (json[key] !== undefined) {
|
if (json[key] !== undefined) {
|
||||||
@ -459,7 +459,7 @@ const storage = {
|
|||||||
key: string,
|
key: string,
|
||||||
value: string | number | object | boolean | null | undefined,
|
value: string | number | object | boolean | null | undefined,
|
||||||
) {
|
) {
|
||||||
const item = sessionStorage.getItem('minexlauncher');
|
const item = sessionStorage.getItem('minexlauncher-v2');
|
||||||
if (item === null) {
|
if (item === null) {
|
||||||
const json: Record<string, unknown> = {};
|
const json: Record<string, unknown> = {};
|
||||||
json[key] = value;
|
json[key] = value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user