Merge pull request #8506 from Budibase/fix/8491

Fix for auto-generated screens - buttons navigating correctly
This commit is contained in:
Michael Drury 2022-11-03 13:52:36 +00:00 committed by GitHub
commit baf8747031
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -225,7 +225,10 @@ const changeFormStepHandler = async (action, context) => {
} }
const closeScreenModalHandler = action => { const closeScreenModalHandler = action => {
let { url } = action.parameters let url
if (action?.parameters) {
url = action.parameters.url
}
// Emit this as a window event, so parent screens which are iframing us in // Emit this as a window event, so parent screens which are iframing us in
// can close the modal // can close the modal
window.parent.postMessage({ type: "close-screen-modal", url }) window.parent.postMessage({ type: "close-screen-modal", url })