feature/meistertask-project-from-title (#11)

* Add .prettierrc

* Read project identifier from card title in the meistertask service
This commit is contained in:
Manuel Bouza 2019-04-04 16:08:08 +02:00 committed by Nicola Piccinini
parent e582f99a94
commit e57caa8563

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]
}
},