Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Commit

Permalink
Always restore stack in endFormObject
Browse files Browse the repository at this point in the history
This fixes parallax#3127
  • Loading branch information
Qendolin authored Apr 15, 2021
1 parent cbc85b4 commit f203684
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/jspdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -5689,8 +5689,11 @@ function jsPDF(options) {

var endFormObject = function(key) {
// only add it if it is not already present (the keys provided by the user must be unique!)
if (renderTargetMap[key]) return;

if (renderTargetMap[key]) {
renderTargetStack.pop().restore();
return;
}

// save the created xObject
var newXObject = new RenderTarget();

Expand Down

0 comments on commit f203684

Please sign in to comment.