Skip to content

Commit

Permalink
i don't now how to was forEach and in past commit it changed to every
Browse files Browse the repository at this point in the history
  • Loading branch information
HamzaElkotp committed Sep 22, 2022
1 parent 76bf247 commit 25f83dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function jsonRead(jsonpages, metatagArr = ["SPAname", "SPAurl", "SPAtitle"]){
ele.addEventListener('click',()=>{

// change title, url regardless of pages or json file objects order
data.evry((item, dataI)=>{
data.forEach((item, dataI)=>{
if(data[dataI][SPAname] == ele.getAttribute("SPAname")){
document.title = data[dataI][SPAtitle];
window.history.pushState("","",data[dataI][SPAurl]);
Expand Down

0 comments on commit 25f83dc

Please sign in to comment.