From 695c2d2e84b3f0046b8aaa715db21867465466db Mon Sep 17 00:00:00 2001 From: muxator Date: Sat, 30 Nov 2019 20:32:39 +0100 Subject: [PATCH] pad.html: fix regression introduced with 5879037ddca4. Revision 5879037ddca4 fixed a security bug, but introduced a regression, where on page load the js console showed: ReferenceError: require is not defined The reason was that the fix called require('../static/js/pad_utils') to load a module at a time when require() was still not defined. This change anticipates the loading of require-kernel, and manually loads pad_utils. The fix proposed in #3670 by aaron-costello, which seemed to do the right thing, anticipating the configuration phase of require-kernel, did not work. It had to be declined and replaced by this (less elegant) change. --- src/templates/pad.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/templates/pad.html b/src/templates/pad.html index 0d3b7e476..34bcf0599 100644 --- a/src/templates/pad.html +++ b/src/templates/pad.html @@ -360,9 +360,13 @@ <% e.end_block(); %> <% e.begin_block("scripts"); %> - + + + + + -