Skip to content

Commit

Permalink
fix: refactor code for "add instrument name"
Browse files Browse the repository at this point in the history
Ref: #163
  • Loading branch information
kunfang98927 committed Oct 21, 2024
1 parent 8079346 commit bac2cc0
Showing 1 changed file with 16 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -304,24 +304,22 @@ document
const languageCode = languageInput.value;
const nameValue = nameInput.value;
const sourceValue = sourceInput.value;
const descriptionValue = descriptionInput.value;
const aliasValue = aliasInput.value;

if (
languageCode &&
nameValue &&
sourceValue &&
descriptionValue &&
aliasValue
) {
entries.push({
language: languageCode,
name: nameValue,
source: sourceValue,
description: descriptionValue,
alias: aliasValue,
});
}
const descriptionValue = descriptionInput.value || '';
const aliasValue = aliasInput.value || '';

console.log('languageCode: ', languageCode);
console.log('nameValue: ', nameValue);
console.log('sourceValue: ', sourceValue);
console.log('descriptionValue: ', descriptionValue);
console.log('aliasValue: ', aliasValue);

entries.push({
language: languageCode,
name: nameValue,
source: sourceValue,
description: descriptionValue,
alias: aliasValue,
});
});

// Check if the user wants to publish to Wikidata
Expand Down

0 comments on commit bac2cc0

Please sign in to comment.