Skip to content

Commit

Permalink
Avoid to call a function in the js sandbox when it has been destroyed
Browse files Browse the repository at this point in the history
  • Loading branch information
calixteman committed Jun 18, 2024
1 parent 0d8828f commit 4bdbf4b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pdf.sandbox.external.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ export class SandboxSupportBase {
* @param {Array<Object>} args - Arguments of the function.
*/
callSandboxFunction(name, args) {
if (!this.commFun) {
return;
}
try {
args = this.exportValueToSandbox(args);
this.commFun(name, args);
Expand Down

0 comments on commit 4bdbf4b

Please sign in to comment.