fix: bug where action:ajaxify.end was never called if there were no init scripts

This commit is contained in:
Julian Lam
2021-01-27 12:08:25 -05:00
parent 8e5687a4af
commit faf5960373

View File

@@ -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');