diff --git a/src/js/render.js b/src/js/render.js index f1217ef..630a2a0 100644 --- a/src/js/render.js +++ b/src/js/render.js @@ -3,7 +3,7 @@ import { removeTags, slugify } from '../helpers'; import { getWordsStats, wordExists } from './utilities'; import { getMatchingSearchWords, highlightSearchTerm, getSearchFilters, getSearchTerm } from './search'; import { showSection } from './displayToggles'; -import { setupSearchFilters, setupWordOptionButtons, setupPagination, setupWordOptionSelections, setupEditFormButtons } from './setupListeners'; +import { setupSearchFilters, setupWordOptionButtons, setupPagination, setupWordOptionSelections, setupWordEditFormButtons } from './setupListeners'; import { getPaginationData } from './pagination'; export function renderAll() { @@ -214,6 +214,6 @@ export function renderEditForm() { `; document.getElementById(wordId.toString()).innerHTML = editForm; - setupEditFormButtons(); + setupWordEditFormButtons(); } } \ No newline at end of file diff --git a/src/js/setupListeners.js b/src/js/setupListeners.js index 1dc1b5f..b761d33 100644 --- a/src/js/setupListeners.js +++ b/src/js/setupListeners.js @@ -173,7 +173,7 @@ export function setupWordOptionSelections() { }); } -export function setupEditFormButtons() { +export function setupWordEditFormButtons() { const saveChangesButtons = document.getElementsByClassName('edit-save-changes'); const cancelChangesButtons = document.getElementsByClassName('edit-cancel'); Array.from(saveChangesButtons).forEach(button => {