diff --git a/services/web/frontend/js/features/pdf-preview/util/compiler.js b/services/web/frontend/js/features/pdf-preview/util/compiler.js index 78aa38e32c..28c175053d 100644 --- a/services/web/frontend/js/features/pdf-preview/util/compiler.js +++ b/services/web/frontend/js/features/pdf-preview/util/compiler.js @@ -65,6 +65,10 @@ export default class DocumentCompiler { async compile(options = {}) { options = { ...this.defaultOptions, ...options } + if (options.isAutoCompileOnLoad && getMeta('ol-preventCompileOnLoad')) { + return + } + // set "compiling" to true (in the React component's state), and return if it was already true const wasCompiling = this.compilingRef.current this.setCompiling(true)