not running init() if there is no init method in each template script

v1.18.x
Julian Lam 11 years ago
parent 64117ab613
commit 0e18ec022c

@ -77,7 +77,7 @@ var ajaxify = {};
templates.load_template(function () { templates.load_template(function () {
exec_body_scripts(content); exec_body_scripts(content);
require(['forum/' + tpl_url], function(script) { require(['forum/' + tpl_url], function(script) {
if (script) script.init(); if (script && script.init) script.init();
}); });
if (callback) { if (callback) {

Loading…
Cancel
Save