Skip to content

Commit

Permalink
Fix destructuring errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy committed Dec 3, 2020
1 parent 9dc1946 commit b88276a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ chrome.storage.sync.get('leethub_token', (data) => {
chrome.storage.sync.get('stats', (psolved) => {
const { stats } = psolved;
if (stats && stats.solved) {
$('#p_solved').text(psolved.solved);
$('#p_solved').text(stats.solved);
}
});
} else {
Expand Down
4 changes: 2 additions & 2 deletions scripts/leetcode.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const upload = (token, hook, code, directory, filename, sha) => {
const updatedSha = JSON.parse(xhr.responseText).content.sha; // get updated SHA.

chrome.storage.sync.get('stats', (data2) => {
let stats = data2.stats;
let { stats } = data2;
if (stats === null || stats === {} || stats === undefined) {
// create stats object
stats = {};
Expand Down Expand Up @@ -107,7 +107,7 @@ function uploadGit(code, problemName, filename) {
/* to get unique key */
const filePath = problemName + filename;
chrome.storage.sync.get('stats', (s) => {
const stats = s.stats;
const { stats } = s;
let sha = null;

if (
Expand Down

0 comments on commit b88276a

Please sign in to comment.