Unhandled rejection Error on t.popup

Andrew J Cameron December 21, 2019

I'm trying to open a popup when a user clicks a button on a card. Before I can create the popup, I need to retrieve some information from shared settings, but it appears that this causes the popup creation to fail.

My code is as follows:

t.get('board', 'shared', 'key')
.then(function(keyVal) {
if (keyVal === "test") {
console.log("do something");
return;
} else {
return t.popup({
type: 'confirm',
title: 'Test Title',
message: 'Test is a test',
confirmText: 'Ok',
onConfirm: function(t, options) {
console.log("do something else");
return t.closePopup();
},
confirmStyle: 'danger'
});
}
});

For some reason, when I try to open the t.popup, I'm getting the following error (line 31 in my js):

image.png

Any ideas as to what I need to change to fix this?

Also worth noting, this was working as-is a few months ago. By any chance did I miss an update to the API that isn't documented yet?

Thanks for taking a look!

 

1 answer

0 votes
Garrett
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 23, 2019

Hey Andrew,

I'd instead recommend posting this over in our developer community: https://community.developer.atlassian.com/c/trello

Our engineers keep an eye out there, and they or any champions would be happy to help you out with this!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events