bug
|
location
|
Expected behvior
|
Issue
|
Solution
|
file
|
line
|
1
|
contrroler.js
|
98
|
Preventing the app's functionalities from working
|
The Controller adddItem method was misspelled
|
rename the method from adddItem to addItem
|
2
|
store.js
|
115
|
there is a potential of conflict between creating duplicated IDs
|
some ids may be the same.
|
First Solution: loop for higher numbers like 10, when generating the Ids, but this is not recommended.
|
Second Solution: use another function to generate a new id depending on the current time and date, like this:
const generateId = () =>
parseInt(Math.random().toString(10).substring(2)) + new Date().getTime();
|