Skip to content

Commit d3a9dbc

Browse files
committed
Move adding the Safe extension to after the configuration is complete so that user configuration of the extensions array can't remove it.
1 parent d36d551 commit d3a9dbc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

unpacked/config/Safe.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
* limitations under the License.
3030
*/
3131

32-
if (!MathJax.Hub.config.extensions) {MathJax.Hub.config.extensions = []}
33-
MathJax.Hub.config.extensions.push("Safe.js");
32+
MathJax.Hub.Register.StartupHook("End Config", function () {
33+
if (!MathJax.Hub.config.extensions) {MathJax.Hub.config.extensions = []}
34+
MathJax.Hub.config.extensions.push("Safe.js");
35+
});
3436

35-
MathJax.Ajax.loadComplete("[MathJax]/config/Safe.js");
37+
MathJax.Ajax.loadComplete("[MathJax]/config/Safe.js");

0 commit comments

Comments
 (0)