You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some client side code calls a @ClientCallable method
The method schedules a beforeClientResponse hook
The hook removes the element from the UI
This results in a JS error like:
Uncaught (in promise) TypeError: this.$server is undefined
anonymous FlowClient.js line 1049 > Function:3
anonymous FlowClient.js line 1049 > Function:3
Ut FlowClient.js:1049
...
The issue seems to be that @ClientCallable schedules a JS call to return the return value of the method to the client:
However, since the element has been removed from the DOM, the JS call results in a null reference.
Expected behavior
There should be no error. Flow should either remove the JS call from the UIDL, or have client-side error handling in case an element reference can not be resolved.
Alternatively, it should not be possible to remove elements from the UI in beforeClientResponse.
Description of the bug
The scenario is basically:
@ClientCallable
methodbeforeClientResponse
hookThis results in a JS error like:
The issue seems to be that
@ClientCallable
schedules a JS call to return the return value of the method to the client:However, since the element has been removed from the DOM, the JS call results in a null reference.
Expected behavior
There should be no error. Flow should either remove the JS call from the UIDL, or have client-side error handling in case an element reference can not be resolved.
Alternatively, it should not be possible to remove elements from the UI in
beforeClientResponse
.Minimal reproducible example
Versions
The text was updated successfully, but these errors were encountered: