-
Notifications
You must be signed in to change notification settings - Fork 0
Bug Fixing
The following are the list of bugs that were fixed:
found a typo on line 95
Controller.prototype.adddItem
changed it to
Controller.prototype.addItem
found omission of the id attribute on line 16
<input class="toggle-all" type="checkbox">
added into it
<input class="toggle-all" id="toggle-all" type="checkbox">
This is as a result of attributing or connecting the input element with a corresponding label element that has a 'for' attribute.
<label for="toggle-all">Mark all as complete</label>
So the value of the 'id' attribute within the input element should correspond to the respective label element
found on line 83
for (var i = 0; i < 6; i++) { newId += charset.charAt(Math.floor(Math.random() * charset.length)); }
replaced with
var isDuplicate = true;
while (isDuplicate){ for (var i = 0; i < 6; i++) { newId += charset.charAt(Math.floor(Math.random() * charset.length)); } isDuplicate = false; for (var i = 0; i < todos.length; i++) { if (todos[i].id == newId) { isDuplicate = true; } } }