I have a board button with a callback that calls a function resetMembership
which calls a popup to confirm the user’s desire to change membership. When I run the following, all is ok:
const resetMembership = (t) => {
t.popup({
type: "confirm",
title: 'Reset Board Membership',
message: `Change`,
confirmText: 'Proceed',
onConfirm: (tx) => {
console.log("Confirmed");
tx.closePopup();
}
});
};
However, when I first try to get information from the board, I get an Unhandled Rejection Error
const resetMembership = (t) => {
t.board('id', 'members', 'memberships')
.then(board => {
t.popup({
type: "confirm",
title: 'Reset Board Membership',
message: `Change ${board.name}`,
confirmText: 'Proceed',
onConfirm: (tx) => {
console.log("Confirmed");
tx.closePopup();
}
});
});
};
I have replaced the t.popup with a t.alert() and t.modal() without getting an error. I have also tried changing the popup type from confirm to a select list but still get the same error.
Does anyone have an idea on why this is happening?
Thanks!