3👍
The bug appears to be in makeObject()
, shown below:
const makeObject = (jobs, img, org) => {
let mjobs = [];
for (let i = 0; i < jobs.length; i++) {
jobs.push({ // FIXME: Pushing into `jobs` which is being iterated
title: jobs[i],
img: "https://merojob.com" + img[i],
org: org[i]
});
}
return mjobs;
}
The for
-loop iterates jobs
, while pushing new objects into it. The termination condition checks that i
is less than jobs.length
, which is being incremented on each iteration, so it never exits the loop.
I think you meant to push into mjobs
inside the for
-loop.
- [Vuejs]-How to trigger a function in vuejs after the page is loaded?
- [Vuejs]-How can Vue.js to create a meta tag to store the `csrftoken` like Django, Laravel?
Source:stackexchange.com