Skip to content

Commit

Permalink
fix(Tinebase) getTitle twingFn can't show async titles
Browse files Browse the repository at this point in the history
  • Loading branch information
corneliusweiss committed Jan 11, 2024
1 parent 4086f68 commit 227aeea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tine20/Tinebase/js/twingEnv.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ const getTwingEnv = function () {
}))

twingEnv.addFunction(new TwingFunction('renderTitle', function (recordData, modelName) {
return Promise.resolve(Tine.Tinebase.data.Record.setFromJson(recordData, modelName)?.getTitle())
const title = Tine.Tinebase.data.Record.setFromJson(recordData, modelName)?.getTitle()
return Promise.resolve(title.asString ? title.asString() : title)
}))

/**
Expand Down

0 comments on commit 227aeea

Please sign in to comment.