Skip to content

Commit

Permalink
Merge pull request #1034 from geoadmin/fix-error-print-user-draw
Browse files Browse the repository at this point in the history
Add replacer on JSON.stringify on checking print spec size. - #patch
  • Loading branch information
pakb authored Aug 20, 2024
2 parents 283fe60 + f91790f commit ce78aa9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/print.api.js
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ export async function abortPrintJob(printJobReference) {
* @returns {boolean} True if not bigger than MAX_PRINT_SPEC_SIZE, false otherwise
*/
function isPrintingSpecSizeValid(printingSpec) {
const jsonString = JSON.stringify(printingSpec)
const jsonString = JSON.stringify(printingSpec, printSpecReplacer)
const byteLength = new TextEncoder().encode(jsonString).length

return byteLength <= MAX_PRINT_SPEC_SIZE
Expand Down

0 comments on commit ce78aa9

Please sign in to comment.