From 7873dd927436f79a8a66e9e269e27c058f9aa823 Mon Sep 17 00:00:00 2001 From: Ilmari Karonen Date: Sat, 13 Jan 2007 00:15:51 +0000 Subject: [PATCH] set doneOnloadHook _before_ calling any hooks, so they don't get run twice if there's an error in one of them. (not bumping $wgStyleVersion, since I just did) --- skins/common/wikibits.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 48f4bfc2a6..1b883ecf79 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -924,6 +924,10 @@ function runOnloadHook() { return; } + // set this before running any hooks, since any errors below + // might cause the function to terminate prematurely + doneOnloadHook = true; + histrowinit(); unhidetzbutton(); tabbedprefs(); @@ -937,8 +941,6 @@ function runOnloadHook() { for (var i = 0; i < onloadFuncts.length; i++) { onloadFuncts[i](); } - - doneOnloadHook = true; } //note: all skins should call runOnloadHook() at the end of html output, -- 2.20.1