Read project identifier from card title in the meistertask service

This commit is contained in:
Manuel Bouza
2019-04-04 09:47:44 +02:00
parent e582f99a94
commit 3b1d180840

View File

@@ -90,7 +90,9 @@ export default {
const json =
document.getElementById("mt-toggl-data")?.dataset?.togglJson || "{}"
const data = JSON.parse(json)
const match = data.projectName?.match(projectRegex)
const match =
data.taskName?.match(projectRegex) ||
data.projectName?.match(projectRegex)
return match && match[1]
}
},