Skip to content

Commit

Permalink
fix: add await to go to/hide actions to fix bug where promise was ret…
Browse files Browse the repository at this point in the history
…urned
  • Loading branch information
ksalzke committed Oct 18, 2021
1 parent 0e8f217 commit 6765d9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Resources/goToTemplatesFolder.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const action = new PlugIn.Action(async function (selection, sender) {
const templateLibrary = this.templateLibrary

const templateFolder = templateLibrary.getTemplateFolder()
const templateFolder = await templateLibrary.getTemplateFolder()

templateFolder.active = true
const urlStr = 'omnifocus:///folder/' + templateFolder.id.primaryKey
Expand Down
4 changes: 3 additions & 1 deletion Resources/hideTemplatesFolder.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
const action = new PlugIn.Action(async function (selection, sender) {
const templateLibrary = this.templateLibrary

const templateFolder = templateLibrary.getTemplateFolder()
const templateFolder = await templateLibrary.getTemplateFolder()

console.log(templateFolder)

templateFolder.active = false
})
Expand Down

0 comments on commit 6765d9e

Please sign in to comment.