Preserve the module insertion order in forEachModuleOfType (#9305)

* Initial commit

* Update testcase

* Revert "Update testcase"

This reverts commit 0d24c4233f.

* Revert initial commit and swap definition order
This commit is contained in:
yaisog 2025-10-21 12:37:55 +02:00 committed by GitHub
parent d7e48207b9
commit 0b38ced43a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2578,10 +2578,10 @@ $tw.boot.execStartup = function(options){
if($tw.safeMode) {
$tw.wiki.processSafeMode();
}
// Register typed modules from the tiddlers we've just loaded
$tw.wiki.defineTiddlerModules();
// And any modules within plugins
// Register typed modules from the tiddlers we've just loaded and any modules within plugins
// Tiddlers should appear last so that they may overwrite shadows during module registration
$tw.wiki.defineShadowModules();
$tw.wiki.defineTiddlerModules();
// Make sure the crypto state tiddler is up to date
if($tw.crypto) {
$tw.crypto.updateCryptoStateTiddler();