Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
DigiWorm0 committed Jun 9, 2024
2 parents 403250d + d56c4fc commit 321e2c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hooks/firebase/publish/usePublishMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { userAtom } from "../useUser";
import { mapThumbnailAtom } from "./useMapThumbnail";
import { publishTargetAtom } from "./usePublishTarget";

const MAX_VALUE = 2147483647;

export const publishMapAtom = atom(null, async (get, set, onProgress: (percent: number) => void) => {
const map = get(mapAtom);
const user = get(userAtom);
Expand All @@ -27,7 +29,7 @@ export const publishMapAtom = atom(null, async (get, set, onProgress: (percent:

// Update Properties
map.id = targetID ?? generateGUID();
map.idVersion = Math.round(Math.random() * Number.MAX_SAFE_INTEGER);
map.idVersion = Math.round(Math.random() * MAX_VALUE);
map.remixOf = isRemix ? oldMapID : null;

map.authorID = user?.uid ?? "";
Expand Down

0 comments on commit 321e2c5

Please sign in to comment.