Skip to content

Commit

Permalink
Merge pull request #18286 from calixteman/call_sandbox
Browse files Browse the repository at this point in the history
Avoid to call a function in the js sandbox when it has been destroyed
  • Loading branch information
calixteman committed Jun 18, 2024
2 parents 4b5d5a5 + 4bdbf4b commit 9dbe4c2
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 9dbe4c2

Please sign in to comment.