mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-22 16:30:34 +01:00
fix: bug where action:ajaxify.end was never called if there were no init scripts
This commit is contained in:
@@ -342,6 +342,10 @@ ajaxify = window.ajaxify || {};
|
||||
// Require and parse modules
|
||||
var outstanding = data.scripts.length;
|
||||
|
||||
if (!outstanding) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
if (outstanding && !app.flags.actionScriptLoadDeprecation) {
|
||||
console.group('Deprecation Notice');
|
||||
console.warn('The "action:script.load" event has been deprecated and will be removed in NodeBB v1.18.0. Please attach a listener to the "static:script.init" client-side hook instead');
|
||||
|
||||
Reference in New Issue
Block a user