mirror of
https://github.com/placeAtlas/atlas.git
synced 2024-06-10 07:19:26 +02:00
Fix how entryId works
This commit is contained in:
parent
7b8fbad690
commit
c8f474cad2
|
@ -48,7 +48,7 @@ const exportArea = document.getElementById("exportString")
|
|||
const subredditPattern = /^(?:(?:(?:(?:(?:https?:\/\/)?(?:(?:www|old|new|np)\.)?)?reddit\.com)?\/)?[rR]\/)?([A-Za-z0-9][A-Za-z0-9_]{1,20})(?:\/[^" ]*)*$/
|
||||
const discordPattern = /^(?:(?:https?:\/\/)?(?:www\.)?(?:(?:discord)?\.?gg|discord(?:app)?\.com\/invite)\/)?([^\s/]+?)(?=\b)$/
|
||||
|
||||
let entryId = 0
|
||||
let entryId = undefined
|
||||
let path = []
|
||||
let center = [canvasCenter.x, canvasCenter.y]
|
||||
|
||||
|
@ -267,7 +267,7 @@ function initDraw() {
|
|||
|
||||
function generateExportObject() {
|
||||
const exportObject = {
|
||||
id: entryId,
|
||||
id: entryId ?? 0,
|
||||
name: nameField.value,
|
||||
description: descriptionField.value,
|
||||
links: {},
|
||||
|
@ -716,8 +716,7 @@ function initDraw() {
|
|||
inputGroup.appendChild(inputButton)
|
||||
}
|
||||
|
||||
let entryId
|
||||
if (params.has('id')) {
|
||||
if (params.has('id') && getEntry(params.get('id'))) {
|
||||
entryId = params.get('id')
|
||||
const entry = getEntry(entryId)
|
||||
|
||||
|
|
Loading…
Reference in a new issue