Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Switched from XMLHttpRequest to fetch API (more modern replacement). - Used async syntax (eliminates the need for callbacks and .then() chains, marginal here but still good practice). - Removed `onreadystatechange`: with Fetch API we can simply wait for the fetch promise to resolve. - Simplified error handling by using a `try/catch` block. - Removed redundant `var` declarations for `const` and `let` variable declarations (modern javascript). - Extracted a helper function `updateModifiedDateElement` to reduce code duplication. - Early `return` in the `if (commits.length === 0)` block to avoid executing the rest of the function. - Removed unnecessary `else` clause since we're returning early in the `if (commits.length === 0)` block.
- Loading branch information