Skip to content

Commit

Permalink
fix dont change ranks if undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Manwe-777 committed Sep 23, 2023
1 parent 6513975 commit 85d096f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/info.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"6.3.3","branch":"master","timestamp":1695488783300}
{"version":"6.3.4","branch":"master","timestamp":1695491473022}
7 changes: 5 additions & 2 deletions src/toolDb/upsertDbRank.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import _ from "lodash";

import { CombinedRankInfo } from "../background/onLabel/InEventGetCombinedRankInfo";
import reduxAction from "../redux/reduxAction";
import store from "../redux/stores/rendererStore";
Expand All @@ -9,8 +11,9 @@ import {
import getLocalSetting from "../utils/getLocalSetting";
import { getData, putData } from "./worker-wrapper";

export default async function upsertDbRank(rank: Partial<CombinedRankInfo>) {
console.log("> Upsert rank", rank);
export default async function upsertDbRank(arg: Partial<CombinedRankInfo>) {
const rank = _(arg).omitBy(_.isUndefined).omitBy(_.isNull).value();
console.log("> Upsert rank", arg, rank);

const uuid = getLocalSetting("playerId") || "default";
const { dispatch } = store;
Expand Down

0 comments on commit 85d096f

Please sign in to comment.