From 285c43dab7af39fd0d2ad01f3917903146d9e1c0 Mon Sep 17 00:00:00 2001 From: Julien Neuhart Date: Wed, 24 Nov 2021 16:48:21 +0100 Subject: [PATCH] fix(chromium): form field 'failOnConsoleException' does not work if JavaScript is disabled --- pkg/modules/chromium/chromium.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/modules/chromium/chromium.go b/pkg/modules/chromium/chromium.go index 97d666fe..6b10181c 100644 --- a/pkg/modules/chromium/chromium.go +++ b/pkg/modules/chromium/chromium.go @@ -432,7 +432,7 @@ func (mod Chromium) PDF(ctx context.Context, logger *zap.Logger, URL, outputPath listenForEventRequestPaused(taskCtx, logger, mod.allowList, mod.denyList) // See https://github.com/gotenberg/gotenberg/issues/262. - if options.FailOnConsoleExceptions { + if options.FailOnConsoleExceptions && !mod.disableJavaScript { listenForEventExceptionThrown(taskCtx, logger, &consoleExceptions, &consoleExceptionsMu) }