Skip to content

Commit

Permalink
fix type issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Lenni009 committed Nov 11, 2023
1 parent 7da38fe commit b07d41a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/inputs/file-input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function updateLabel(file: File) {
fileName.value = file.name
}
function addFile(file: File | undefined = undefined) {
function addFile(file: File | null = null) {
const uploadedFile = file ?? fileInput.value?.files?.[0];
if (!uploadedFile) return;
updateLabel(uploadedFile);
Expand Down
2 changes: 1 addition & 1 deletion src/components/output/exml-snippet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ watch(data, (newValue) => {
if (newValue.exmlOutput) newValue.exmlOutput.innerText = xmlString;
})
function getXmlString(fileXmlDoc: XMLDocument | undefined, rewardSearchTerm: string) {
function getXmlString(fileXmlDoc: XMLDocument | null, rewardSearchTerm: string) {
if (!fileXmlDoc || !rewardSearchTerm) return;
const domSection = searchRewardSection(fileXmlDoc, rewardSearchTerm);
if (!domSection) return;
Expand Down
2 changes: 1 addition & 1 deletion src/logic/logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function processEXML(contents: string) {
/**
* searches the EXML section for a given reward and returns its DOM element
*/
export function searchRewardSection(xmlDoc: XMLDocument | undefined, rewardId: string): Element | undefined {
export function searchRewardSection(xmlDoc: XMLDocument | null, rewardId: string): Element | undefined {
if (!xmlDoc) return;
const xmlSectionDom = xmlDoc.querySelector(`[value="GcGenericRewardTableEntry.xml"] > [name="Id"][value=${rewardId} i], [value="GcRewardTableEntry.xml"] > [name="Id"][value=${rewardId} i]`)?.parentNode as Element | undefined;
return xmlSectionDom;
Expand Down

0 comments on commit b07d41a

Please sign in to comment.