Skip to content

Commit

Permalink
fix(todoist): Fix todoist project population
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelijepetak authored and dpsxp committed Jan 5, 2021
1 parent 0523c34 commit 924a400
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/scripts/content/todoist.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ togglbutton.render(
let project = '';
const projectId = rootEl.getAttribute('data-item-id');

if (document.getElementById(`item_${projectId}`)) {
if (document.querySelector('.project_view h1 span.simple_content')) {
project = document.querySelector('.project_view h1 span.simple_content').textContent.trim();
} else if (document.getElementById(`item_${projectId}`)) {
// (legacy?) project ID element
const projectContent = document.getElementById(`item_${projectId}`).querySelector('.content');
project = getProjectNames(projectContent);
Expand Down

0 comments on commit 924a400

Please sign in to comment.